Sha256: efa1a18f70d0d1256b2068cb5f1ae5bcdfc49f51cd888fde69b6c52733afa146
Contents?: true
Size: 776 Bytes
Versions: 2
Compression:
Stored size: 776 Bytes
Contents
require "bundler/gem_tasks" namespace :bin do task :setup do binaries_location = "./externals" %W(sloccount oclint).each do |executable_dir| executable_dir_path = "#{binaries_location}/#{executable_dir}" binaries = Dir.entries(executable_dir_path).select {|f| !File.directory? f} binaries.each do |binary| contents = <<-RUBY require 'pathname' pn = Pathname.new(__FILE__) opts = ARGV.join(" ") puts `"\#{pn.dirname}/../#{executable_dir_path}/\#{pn.basename}" \#{opts}` RUBY gem_binary_path = "./bin/#{binary}" File.open(gem_binary_path, 'w') { |file| file.write(contents) } FileUtils.chmod('a+x', [gem_binary_path]) puts "#{gem_binary_path} generated" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
objective-ci-0.0.2 | Rakefile |
objective-ci-0.0.1 | Rakefile |