another tweak to release script
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/52c174a2 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/52c174a2 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/52c174a2 Branch: refs/heads/build/wicket-1.5.4 Commit: 52c174a261707711ee00d5eafe77ff4012c448ae Parents: de32137 Author: Igor Vaynberg <[email protected]> Authored: Tue Jan 10 09:33:35 2012 -0800 Committer: Igor Vaynberg <[email protected]> Committed: Tue Jan 10 09:36:29 2012 -0800 ---------------------------------------------------------------------- release-igor.sh | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/52c174a2/release-igor.sh ---------------------------------------------------------------------- diff --git a/release-igor.sh b/release-igor.sh index ea06a30..660dc2e 100755 --- a/release-igor.sh +++ b/release-igor.sh @@ -45,9 +45,11 @@ rm pom.xml.asc branch="build/wicket-$version" echo "Removing previous build branch $branch (if exists)" -git branch -D $branch +oldbranch=`git branch |grep -e "$branch"|wc -l` +[ "$oldbranch" -ne 0 ] && git branch -D $branch + echo "Switching to branch $branch" -git checkout $branch +git checkout -b $branch echo "Modifying poms with the new version: $version" mvn5 versions:set -DnewVersion=$version
