release.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
New commits: commit 30fd33737747ce87134cea2203f7b08ed2b0e526 Author: Stefan Negrea snegrea@redhat.com Date: Mon Feb 27 10:58:56 2012 -0600
Avoid merging remote branch into local code when using branching strategy because the branch does not exist yet remotely.
diff --git a/release.sh b/release.sh index 51ff163..af311e1 100755 --- a/release.sh +++ b/release.sh @@ -360,9 +360,14 @@ run_release_version_and_tag_process() [ "$?" -ne 0 ] && abort "Tagging failed" fi
- echo "9) Merge any remote changes into the local branch to be able to push tag and version change. This will fail if the merge process requires manual merges." - git pull origin "$BUILD_BRANCH" - [ "$?" -ne 0 ] && abort "Merge with remote $BUILD_BRANCH failed." + if [ "$SCM_STRATEGY" = "tag" ]; + then + echo "9) Merge any remote changes into the local branch to be able to push tag and version change. This will fail if the merge process requires manual merges." + git pull origin "$BUILD_BRANCH" + [ "$?" -ne 0 ] && abort "Merge with remote $BUILD_BRANCH failed." + else + echo "9) DID NOT execute this step because local branch was created. No need to merge back changes." + fi
echo "10) If everything went well so far than means all the changes can be pushed!!!" git push origin "refs/heads/$BUILD_BRANCH"