inspec/inspec-bin/Rakefile
Ryan Davis 81142952e5 Changing the rakefile setup so all gems get built.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-10 18:34:00 -08:00

10 lines
372 B
Ruby

Bundler::GemHelper.install_tasks name: "inspec-bin"
desc "force install the inspec-bin gem"
task "install:force" do
sh "gem build -V inspec-bin.gemspec"
built_gem_path = Dir["inspec-bin-*.gem"].sort_by { |f| File.mtime(f) }.last
FileUtils.mkdir_p("pkg") unless Dir.exist?("pkg")
FileUtils.mv(built_gem_path, "pkg")
sh "gem install -f pkg/#{built_gem_path}"
end