File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,20 @@ namespace :vox do
1616 cmd = "bundle exec build #{ project } #{ platform } --engine #{ engine } "
1717
1818 FileUtils . rm_rf ( 'C:/ProgramFiles64Folder/' ) if platform =~ /^windows-/
19-
20- run_command ( cmd , silent : false , print_command : true , report_status : true )
19+ libdir = `ruby -e "require 'rbconfig'; puts RbConfig::CONFIG['rubylibdir']"` . chomp
20+ begin
21+ run_command ( cmd , silent : false , print_command : true , report_status : true )
22+ ensure
23+ # During the build process for macos-all-x86_64, we patch two files in the
24+ # host ruby installation. If we don't revert those changes, subsequent tasks
25+ # like uploading to S3 wil fail.
26+ if platform == 'macos-all-x86_64'
27+ puts 'Reverting changes to host ruby installation...'
28+ [ 'rubygems/ext/builder.rb' , 'rubygems/basic_specification.rb' ] . each do |f |
29+ FileUtils . rm_f ( "#{ libdir } /#{ f } " )
30+ FileUtils . mv ( "#{ libdir } /#{ f } .orig" , "#{ libdir } /#{ f } " )
31+ end
32+ end
33+ end
2134 end
2235end
You can’t perform that action at this time.
0 commit comments