llvm.org GIT mirror llvm / 589d1a1
Release tag script: add -revision option It seems useful to be able to create the branch at a revision that looks good on the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225736 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 4 years ago
1 changed file(s) with 21 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
1818 rebranch="no"
1919 projects="llvm cfe dragonegg test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp"
2020 dryrun=""
21 revision="HEAD"
2122
2223 base_url="https://llvm.org/svn/llvm-project"
2324
2425 function usage() {
25 echo "usage: `basename $0` -release [-rebranch] [-dry-run]"
26 echo "usage: `basename $0` -release [-rebranch] [-revision ] [-dry-run]"
2627 echo "usage: `basename $0` -release -rc [-dry-run]"
2728 echo " "
28 echo " -release The version number of the release"
29 echo " -rc The release candidate number"
30 echo " -rebranch Remove existing branch, if present, before branching"
31 echo " -final Tag final release candidate"
32 echo " -dry-run Make no changes to the repository, just print the commands"
29 echo " -release The version number of the release"
30 echo " -rc The release candidate number"
31 echo " -rebranch Remove existing branch, if present, before branching"
32 echo " -final Tag final release candidate"
33 echo " -revision Revision to branch off (default: HEAD)"
34 echo " -dry-run Make no changes to the repository, just print the commands"
3335 }
3436
3537 function tag_version() {
4244 ${dryrun} svn remove -m "Removing old release_$branch_release branch for rebranching." \
4345 $base_url/$proj/branches/release_$branch_release
4446 fi
45 ${dryrun} svn copy -m "Creating release_$branch_release branch" \
47 ${dryrun} svn copy -m "Creating release_$branch_release branch off revision ${revision}" \
48 -r ${revision} \
4649 $base_url/$proj/trunk \
4750 $base_url/$proj/branches/release_$branch_release
4851 done
8083 -final | --final )
8184 rc="final"
8285 ;;
86 -revision | --revision )
87 shift
88 revision="$1"
89 ;;
8390 -dry-run | --dry-run )
8491 dryrun="echo"
8592 ;;
109116 if [ "x$rc" = "x" ]; then
110117 tag_version
111118 else
119 if [ "x$revision" != "x" ]; then
120 echo "error: cannot use -revision with -rc"
121 echo
122 usage
123 exit 1
124 fi
125
112126 tag_release_candidate
113127 fi
114128