lib/hatchet/git_app.rb in heroku_hatchet-1.0.0 vs lib/hatchet/git_app.rb in heroku_hatchet-1.1.0
- old
+ new
@@ -1,12 +1,14 @@
module Hatchet
# used for deploying a test app to heroku via git
class GitApp < App
+ HATCHET_BUILDPACK_BASE = (ENV['HATCHET_BUILDPACK_BASE'] || "https://github.com/heroku/heroku-buildpack-ruby.git")
+ HATCHET_BUILDPACK_BRANCH = (ENV['HATCHET_BUILDPACK_BRANCH'] || Hatchet.git_branch)
BUILDPACK_URL = "https://github.com/heroku/heroku-buildpack-ruby.git"
def initialize(directory, options = {})
- @buildpack = options[:buildpack] || options[:buildpack_url] || BUILDPACK_URL
+ @buildpack = options[:buildpack] || options[:buildpack_url] || [HATCHET_BUILDPACK_BASE, HATCHET_BUILDPACK_BRANCH].join("#")
super
end
def setup!
super
@@ -18,10 +20,10 @@
end
def push!
output = `git push #{git_repo} master 2>&1`
if !$?.success?
- raise FailedDeploy.new(self, output) unless @allow_failure
+ raise FailedDeploy.new(self, "Buildpack: #{@buildpack.inspect}\n#{output}") unless @allow_failure
end
return output
end
end
end