Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nightpool committed Jul 18, 2020
1 parent 818cc4e commit ffc7bb0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -27,7 +27,9 @@ before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$TRAVIS_RUBY_VERSION" != "system" ]; then gem update bundler; fi
script:
- git submodule update --init
- bundle exec rake spec binary osx_varients --trace
- bundle exec rake spec binary --trace
before_deploy:
- bundle exec rake osx_varients --trace
deploy:
provider: releases
file_glob: true
Expand Down
21 changes: 13 additions & 8 deletions Rakefile
@@ -1,6 +1,7 @@
require 'bundler/setup'
require 'rspec/core/rake_task'
require 'tmpdir'
require 'rubygems/package'

Bundler::GemHelper.install_tasks
RSpec::Core::RakeTask.new :spec
Expand Down Expand Up @@ -48,8 +49,6 @@ end

desc "build a binary gem #{Helpers.binary_gem_name}"
task :binary => :compile do
require 'rubygems/package'

gemspec = Helpers.binary_gemspec

FileUtils.chmod 0644, gemspec.files
Expand Down Expand Up @@ -106,13 +105,19 @@ end
task :default => [:compile, :spec]
task :build => [:clean]

desc 'Generate OSX varient platform names'
task :osx_varients => [:compile] do
gemspec = binary_gemspec
return unless gemspec.platform == 'osx'
desc 'Generate OSX varient platform names. Requires `compile` to already have been run.'
task :osx_varients do
gemspec = Helpers.binary_gemspec
next unless gemspec.platform.os == 'osx'

%w(x86_64 universal).each do |cpu|
gemspec.platform.cpu = cpu
Gem::Package.build gemspec
platform = gemspec.platform.dup
next unless platform.cpu != cpu

platform.cpu = cpu
gemspec.platform = platform

package = Gem::Package.build gemspec
FileUtils.mv package, 'pkg'
end
end

0 comments on commit ffc7bb0

Please sign in to comment.