Sha256: d930d78e8e4fd430a8480ac7b423aceea8b45b68f6805f2e839627c633fa6cd4

Contents?: true

Size: 765 Bytes

Versions: 127

Compression:

Stored size: 765 Bytes

Contents

module DPL
  class Provider
    module Heroku
      class Git < Generic
        requires 'netrc'

        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

127 entries across 127 versions & 2 rubygems

Version Path
dpl-1.8.35.travis.2098.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.35.travis.2090.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.34.travis.2089.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.34 lib/dpl/provider/heroku/git.rb
dpl-1.8.33.travis.2049.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.33.travis.2048.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.33.travis.2043.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.33.travis.2031.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.33.travis.2025.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.33.travis.1999.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.33.travis.1976.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.32 lib/dpl/provider/heroku/git.rb
dpl-1.8.32.travis.1958.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.32.travis.1957.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.32.travis.1956.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.32.travis.1955.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.32.travis.1950.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.32.travis.1949.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.32.travis.1935.5 lib/dpl/provider/heroku/git.rb
dpl-1.8.32.travis.1901.6 lib/dpl/provider/heroku/git.rb