Sha256: 60c58ab2a4f1a6f2eb12b430aac0bab6c10b493bda126db9ae68866fa92068bc

Contents?: true

Size: 844 Bytes

Versions: 11

Compression:

Stored size: 844 Bytes

Contents

#!/usr/bin/env ruby
require 'bundler'
require 'shellwords'
puts "== Setting Up CI =="

netrc_file = "#{ENV['HOME']}/.netrc"
unless File.exists?(netrc_file)
  File.open(netrc_file, 'w') do |file|
    file.write <<-EOF
machine git.heroku.com
login #{ENV.fetch('HEROKU_API_USER')}
password #{ENV.fetch('HEROKU_API_KEY')}
EOF
  end
end

[
 "bundle exec hatchet ci:install_heroku",
 "bundle exec hatchet install",
 "git config --get user.email > /dev/null || git config --global user.email #{ENV.fetch('HEROKU_API_USER').shellescape}",
 "git config --get user.name > /dev/null || git config --global user.name 'BuildpackTester'",
].each do |command|
  puts "== Running: #{command}"
  Bundler.with_clean_env do
    result = `#{command}`
    raise "Command failed: #{command.inspect}\nResult: #{result}" unless $?.success?
  end
end
puts "== Done =="

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
heroku_hatchet-5.0.0 etc/ci_setup.rb
heroku_hatchet-4.1.2 etc/ci_setup.rb
heroku_hatchet-4.1.1 etc/ci_setup.rb
heroku_hatchet-4.1.0 etc/ci_setup.rb
heroku_hatchet-4.0.13 etc/ci_setup.rb
heroku_hatchet-4.0.12 etc/ci_setup.rb
heroku_hatchet-4.0.11 etc/ci_setup.rb
heroku_hatchet-4.0.10 etc/ci_setup.rb
heroku_hatchet-4.0.9 etc/ci_setup.rb
heroku_hatchet-4.0.8 etc/ci_setup.rb
heroku_hatchet-4.0.7 etc/ci_setup.rb