diff options
-rwxr-xr-x | utils/release/tag.sh | 18 |
1 files 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 <num>" + echo "usage: `basename $0` -release <num> [-rebranch]" echo "usage: `basename $0` -release <num> -rc <num>" echo " " echo " -release <num> The version number of the release" echo " -rc <num> 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" ;; |