Class: DPL::Provider::Heroku::Git
- Inherits:
-
Generic
- Object
- DPL::Provider
- Generic
- DPL::Provider::Heroku::Git
- Defined in:
- lib/dpl/provider/heroku/git.rb
Instance Attribute Summary
Attributes inherited from Generic
Attributes inherited from DPL::Provider
Instance Method Summary collapse
Methods inherited from Generic
#check_app, #check_auth, #faraday, #handle_error_response, #needs_key?, #restart, #run
Methods inherited from DPL::Provider
apt_get, #check_app, #cleanup, #commit_msg, context, #create_key, #default_text_charset, #default_text_charset?, #deploy, deprecated, #detect_encoding?, #encoding_for, #error, experimental, #initialize, #log, #needs_key?, new, npm_g, #option, pip, requires, #run, #setup_git_credentials, #setup_git_ssh, #sha, shell, #uncleanup, #user_agent, #warn
Constructor Details
This class inherits a constructor from DPL::Provider
Instance Method Details
#git_url ⇒ Object
7 8 9 |
# File 'lib/dpl/provider/heroku/git.rb', line 7 def git_url "https://git.heroku.com/#{option(:app)}.git" end |
#push_app ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/dpl/provider/heroku/git.rb', line 11 def push_app git_remote = [: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 ⇒ Object
20 21 22 23 24 |
# 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 |