From bdcfb7663a2a62fd52a14dbeaa076423c719ec2d Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 18 Apr 2012 21:38:12 +0000 Subject: Add a flag to rebranch if we need to. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155049 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/release/tag.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/utils/release/tag.sh b/utils/release/tag.sh index 551fe91300..399d5c5a7f 100755 --- a/utils/release/tag.sh +++ b/utils/release/tag.sh @@ -16,26 +16,33 @@ set -e release="" rc="" +rebranch="no" base_url="https://llvm.org/svn/llvm-project" function usage() { - echo "usage: `basename $0` -release " + echo "usage: `basename $0` -release [-rebranch]" echo "usage: `basename $0` -release -rc " echo " " echo " -release The version number of the release" echo " -rc The release candidate number" + echo " -rebranch Remove existing branch, if present, before branching" echo " -final Tag final release candidate" } function tag_version() { set -x for proj in llvm cfe dragonegg test-suite compiler-rt ; do - if ! svn ls $base_url/$proj/branches/release_$release > /dev/null 2>&1 ; then - svn copy -m "Creating release_$release branch" \ - $base_url/$proj/trunk \ + if svn ls $base_url/$proj/branches/release_$release > /dev/null 2>&1 ; then + if [ $rebranch = "no" ]; then + continue + fi + svn remove -m "Removing old release_$release branch for rebranching." \ $base_url/$proj/branches/release_$release fi + svn copy -m "Creating release_$release branch" \ + $base_url/$proj/trunk \ + $base_url/$proj/branches/release_$release done set +x } @@ -65,6 +72,9 @@ while [ $# -gt 0 ]; do shift rc="rc$1" ;; + -rebranch | --rebranch ) + rebranch="yes" + ;; -final | --final ) rc="final" ;; -- cgit v1.2.3-18-g5258