Sha256: 34e8b13945e023c75893c0591e8fc12d7572f3917041938e9fcee16569e16309
Contents?: true
Size: 1.65 KB
Versions: 4
Compression:
Stored size: 1.65 KB
Contents
#!/usr/bin/env ruby class Tool def initialize(name) @name = name end def bundler? @name == 'bundler' end def rubygems? @name == 'rubygems' end def dir if rubygems? File.expand_path('../..', __FILE__) else File.expand_path('../../bundler', __FILE__) end end end TOOL = Tool.new(ENV.fetch("TEST_TOOL") { abort "must specify a TEST_TOOL" }) def run(command, args = []) Dir.chdir(TOOL.dir) do unless system(command, *args) abort "running `#{command} #{args.join(" ")}` failed" end end end def with_retries(attempts = 3) yield rescue StandardError, SystemExit => e attempts -= 1 if attempts > 0 warn "Command failed (#{e}). Retrying #{attempts -= 1} more times." retry else raise end end case ARGV when %w(before_script) if TOOL.rubygems? run('gem', %W(uninstall executable-hooks gem-wrappers -x --force -i #{`gem env home`.strip}@global)) run('gem', %W(install rake -v #{'~> 10.5'} --no-document)) run('gem', %W(install bundler -v #{'1.16.6'} --no-document)) run('gem', %W(install hoe -v #{'3.15.0'} --no-document)) run('gem', %w(install hoe-travis --no-document)) run('gem', %W(install minitest -v #{'~> 4.7'} --no-document)) run('rake', %w(_10.5.0_ travis:before -t)) run('gem', %w(list --details)) run('gem', %w(env)) else with_retries { run('rake', %w(spec:travis:deps)) } end when %w(after_script) if TOOL.rubygems? run('rake', %w(_10.5.0_ travis:after -t)) end when %w(script) if TOOL.rubygems? run('rake', %w(_10.5.0_ travis)) else run('rake', %w(spec:travis -t)) end else abort "unknown args #{ARGV.inspect}" end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rubygems-update-2.7.11 | util/ci |
rubygems-update-2.7.10 | util/ci |
rubygems-update-2.7.9 | util/ci |
rubygems-update-2.7.8 | util/ci |