Skip to content

Commit

Permalink
Add a flag to rebranch if we need to.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155049 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
isanbard committed Apr 18, 2012
1 parent 3709762 commit bdcfb76
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions utils/release/tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -65,6 +72,9 @@ while [ $# -gt 0 ]; do
shift
rc="rc$1"
;;
-rebranch | --rebranch )
rebranch="yes"
;;
-final | --final )
rc="final"
;;
Expand Down

0 comments on commit bdcfb76

Please sign in to comment.