File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ unless Concurrent.on_jruby? || Concurrent.on_truffleruby?
2828 end
2929end
3030
31+ def which? ( executable )
32+ !`which #{ executable } 2>/dev/null` . empty?
33+ end
34+
3135require 'rake_compiler_dock'
3236namespace :repackage do
3337 desc '* with Windows fat distributions'
@@ -42,12 +46,19 @@ namespace :repackage do
4246 Rake ::Task [ 'lib/concurrent-ruby/concurrent/concurrent_ruby.jar' ] . invoke
4347
4448 # build all gem files
49+ rack_compiler_dock_kwargs = { }
50+ if which? ( 'podman' ) and ( !which? ( 'docker' ) || `docker --version` . include? ( 'podman' ) )
51+ # podman and only podman available, so RakeCompilerDock will use podman, otherwise it uses docker
52+ rack_compiler_dock_kwargs = {
53+ options : [ '--privileged' ] , # otherwise the directory in the image is empty
54+ runas : false
55+ }
56+ end
4557 %w[ x86-mingw32 x64-mingw32 ] . each do |plat |
4658 RakeCompilerDock . sh (
4759 "bundle install --local && bundle exec rake native:#{ plat } gem --trace" ,
4860 platform : plat ,
49- options : [ '--privileged' ] , # otherwise the directory in the image is empty
50- runas : false )
61+ **rack_compiler_dock_kwargs )
5162 end
5263 end
5364 end
You can’t perform that action at this time.
0 commit comments