Class: Takeoff::Stage::VerifyGithubUpToDate
- Defined in:
- lib/takeoff/stage/verify_github_up_to_date.rb
Instance Method Summary collapse
Methods inherited from Base
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
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/takeoff/stage/verify_github_up_to_date.rb', line 6 def call(env) log "Fetching from GitHub" execute "git fetch #{env[:github_remote]}" unless branches_up_to_date?("#{env[:github_remote]}/#{env[:development_branch]}", env[:development_branch]) raise "GitHub is not up to date on branch '#{env[:development_branch]}'. Pull and push to synchronize your changes first." end @app.call(env) end |