Sha256: 000cfe6aae4e0549df6e33d7a51f15fc741a802233045959d6f8d61a0551ca47

Contents?: true

Size: 739 Bytes

Versions: 135

Compression:

Stored size: 739 Bytes

Contents

module DPL
  class Provider
    module Heroku
      class Git < Generic
        def git_url
          "https://git.heroku.com/#{option(:app)}.git"
        end

        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

        def write_netrc
          n = Netrc.read
          n['git.heroku.com'] = [user, option(:api_key)]
          n.save
        end
      end
    end
  end
end

Version data entries

135 entries across 135 versions & 1 rubygems

Version Path
dpl-heroku-1.10.17.travis.6637.6 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.16 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.16.travis.6625.6 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.16.travis.6619.6 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.16.travis.5961.5 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.15 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.15.travis.5877.5 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.14 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.13 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.13.travis.4159.5 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.13.travis.4141.5 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.13.travis.4040.5 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.13.travis.4033.5 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.12 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.12.travis.4032.5 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.12.travis.3794.5 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.12.travis.3506.5 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.11.travis.3504.5 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.11 lib/dpl/provider/heroku/git.rb
dpl-heroku-1.10.11.travis.3499.5 lib/dpl/provider/heroku/git.rb