module RakeCompilerDock
def exec(*args, &block)
Examples:
* Option +:groupname+ can be used to overwrite the group name in the container
* Option +:username+ can be used to overwrite the user name in the container
* Option +:options+ can be an Array of additional options to the 'docker run' command.
* Option +:runas+ can be set to false to execute the command as user root.
* Option +:sigfw+ can be set to false to not stop the container on Ctrl-C.
* Option +:check_docker+ can be set to false to disable the docker check.
If not set, rake's verbose flag is used.
* Option +:verbose+ can be set to enable printing of the command line.
Without a block a RuntimeError is raised when the command exits non-zero.
If a block is given, upon command completion the block is called with an OK flag (true on a zero exit status) and a Process::Status object.
The command is run directly, without the shell.
Run the command cmd within a fresh rake-compiler-dock container.
def exec(*args, &block) Starter.exec(*args, &block) end
def image_name
def image_name Starter.image_name end
def sh(cmd, options={}, &block)
end
puts "windows cross build failed (status = #{res.exitstatus})"
if ! ok
sh %{bundle && rake cross native gem}, verbose: false do |ok, res|
Check exit status after command runs:
RakeCompilerDock.sh 'bundle && rake cross native gem'
Examples:
Default is "x86-mingw32 x64-mingw32" .
Option +:platform+ is ignored when +:rubyvm+ is set to +:jruby+.
If the list contains multiple values, +cmd+ is consecutively executed in each of the docker images,
+x64-mingw32+, +x86-linux-gnu+, +x86-mingw32+, +x86_64-darwin+, +x86_64-linux-gnu+.
Allowed values are +aarch64-linux-gnu+, +arm-linux-gnu+, +arm64-darwin+, +x64-mingw-ucrt+,
It selects the docker image(s) with an appropriate toolchain.
Option +:platform+ can be set to a list of space separated values.
It selects the docker image with an appropriate toolchain.
Option +:rubyvm+ can be set to +:mri+ or +:jruby+ .
If not set, rake's verbose flag is used.
Option +:verbose+ can be set to enable printing of the command line.
Without a block a RuntimeError is raised when the command exits non-zero.
If a block is given, upon command completion the block is called with an OK flag (true on a zero exit status) and a Process::Status object.
Run the command cmd within a fresh rake-compiler-dock container and within a shell.
def sh(cmd, options={}, &block) Starter.sh(cmd, options, &block) end