Class: Takeoff::Stage::Heroku::RememberCommits

Inherits:
Base
  • Object
show all
Defined in:
lib/takeoff/stage/heroku/remember_commits.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Helpers

#branches_up_to_date?, #diff, #execute, #file_has_changed_locally?, #files_have_changed?, #latest_commit, #log

Constructor Details

This class inherits a constructor from Takeoff::Stage::Base

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/takeoff/stage/heroku/remember_commits.rb', line 7

def call(env)
  log     "Fetching from server"
  execute "git fetch #{env[:server_remote]}"
  
  env[:deployed_commit] = latest_commit("#{env[:server_remote]}/master")
  env[:new_commit]      = latest_commit(env[:development_branch])

  @app.call(env)
end