From 9f9dc504f03a905b86bc850c24155f998ac28c58 Mon Sep 17 00:00:00 2001 From: Miah Johnson Date: Mon, 16 Sep 2019 18:23:34 -0700 Subject: [PATCH] Add Rakefile to inspec-bin to allow `rake install` to function. Without the Rakefile `rake install` looped forever. Signed-off-by: Miah Johnson --- inspec-bin/Rakefile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 inspec-bin/Rakefile diff --git a/inspec-bin/Rakefile b/inspec-bin/Rakefile new file mode 100644 index 000000000..f7703a3a3 --- /dev/null +++ b/inspec-bin/Rakefile @@ -0,0 +1,10 @@ +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