lib/gitscape/base.rb in gitscape-1.6.2 vs lib/gitscape/base.rb in gitscape-1.6.3

- old
+ new

@@ -76,10 +76,13 @@ def hotfix_start hotfix_branch=nil, options={:push=>false} # option defaults options[:push] = false if options[:push].nil? + # Check that the working copy is clean + exit 1 unless git_working_copy_is_clean + puts `git checkout live` puts `git pull origin` if hotfix_branch.to_s.length == 0 exception_message = "*** Improper Usage ***\nExpected Usage: hotfix_start <hotfix_name> [--[no-]push]" @@ -96,9 +99,12 @@ def hotfix_finish hotfix_branch=nil, options={:env_depth=>:staging, :push=>true, :update_env=>false} # option defaults options[:env_depth] = :staging if options[:env_depth].nil? options[:push] = true if options[:push].nil? options[:update_env] = false if options[:update_env].nil? + + # Check that the working copy is clean + exit 1 unless git_working_copy_is_clean usage_string = "expected usage: hotfix_finish [<hotfix_branch>] hotfix_branch: the name of the hotfix branch to finish. if ommitted, you must currently be on a hotfix branch"