Skip to content

Commit

Permalink
Hotfix: do branch update *always* on merge
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongchiamiov committed Dec 11, 2012
1 parent 880e0c5 commit f4911f5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hotfix.rb
Expand Up @@ -63,9 +63,6 @@

if ARGV[1]
hotfix = BRANCH_PREFIX + ARGV[1]
# Checkout the branch to make sure we have it locally.
Git::run_safe("git checkout \"#{hotfix}\"")
Git::run_safe("git rebase --preserve-merges origin/#{hotfix}")
else
hotfix = Git::current_branch
end
Expand All @@ -74,6 +71,10 @@

description = Github::get_pull_request_description_from_api(hotfix, 'stable')

# Checkout the branch to make sure we have it locally.
Git::run_safe("git checkout \"#{hotfix}\"")
Git::run_safe("git rebase --preserve-merges origin/#{hotfix}")

# Merge into stable
Git::run_safe("git checkout stable")
# pull the latest changes and rebase the unpushed commits if any.
Expand Down

0 comments on commit f4911f5

Please sign in to comment.