class DPL::Provider::Heroku::Git

Public Instance Methods

git_url() click to toggle source
# File lib/dpl/provider/heroku/git.rb, line 7
def git_url
  "https://git.heroku.com/#{option(:app)}.git"
end
push_app() click to toggle source
# File lib/dpl/provider/heroku/git.rb, line 11
def push_app
  git_remote = options[:git] || git_url
  write_netrc if git_remote.start_with?("https://")
  log "$ git fetch origin $TRAVIS_BRANCH --unshallow"
  context.shell "git fetch origin $TRAVIS_BRANCH --unshallow"
  log "$ git push #{git_remote} HEAD:refs/heads/master -f"
  context.shell "git push #{git_remote} HEAD:refs/heads/master -f"
end
write_netrc() click to toggle source
# File lib/dpl/provider/heroku/git.rb, line 20
def write_netrc
  n = Netrc.read
  n['git.heroku.com'] = [user, option(:api_key)]
  n.save
end