Sha256: 72f23f0baf4dbc7056a9c4615bac4757cda0642920ccb070ed87961c30b54a80

Contents?: true

Size: 1.25 KB

Versions: 7

Compression:

Stored size: 1.25 KB

Contents

require "rake_compiler_dock"
require "rake_compiler_dock/gem_helper"

RakeCompilerDock::GemHelper.install_tasks

task :build do
  sh "docker build -t larskanis/rake-compiler-dock-mri:#{RakeCompilerDock::IMAGE_VERSION} -f Dockerfile.mri ."
  sh "docker build -t larskanis/rake-compiler-dock-jruby:#{RakeCompilerDock::IMAGE_VERSION} -f Dockerfile.jruby ."
end

desc "Run tests"
task :test do
  sh "ruby -w -W2 -I. -Ilib -e \"#{Dir["test/test_*.rb"].map{|f| "require '#{f}';"}.join}\" -- -v"
end

desc "Update predefined_user_group.rb"
task :update_lists do

  users = `rake-compiler-dock bash -c "getent passwd"`.each_line.map do |line|
    line.chomp.split(":")[0]
  end.compact.reject(&:empty?) - [RakeCompilerDock::Starter.make_valid_user_name(`id -nu`.chomp)]

  groups = `rake-compiler-dock bash -c "getent group"`.each_line.map do |line|
    line.chomp.split(":")[0]
  end.compact.reject(&:empty?) - [RakeCompilerDock::Starter.make_valid_group_name(`id -ng`.chomp)]

  File.open("lib/rake_compiler_dock/predefined_user_group.rb", "w") do |fd|
    fd.puts <<-EOT
      # DO NOT EDIT - This file is generated per 'rake update_lists'
      module RakeCompilerDock
        PredefinedUsers = #{users.inspect}
        PredefinedGroups = #{groups.inspect}
      end
    EOT
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
win32-api-1.10.1 vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/Rakefile
win32-api-1.10.0 vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/Rakefile
win32-api-1.9.2 vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/Rakefile
win32-api-1.9.1 vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/Rakefile
rake-compiler-dock-0.7.2 Rakefile
rake-compiler-dock-0.7.1 Rakefile
rake-compiler-dock-0.7.0 Rakefile