llvm.org GIT mirror llvm / ab860e7
Release tag script: add -dry-run flag git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225735 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 4 years ago
1 changed file(s) with 11 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
1717 rc=""
1818 rebranch="no"
1919 projects="llvm cfe dragonegg test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp"
20 dryrun=""
2021
2122 base_url="https://llvm.org/svn/llvm-project"
2223
2324 function usage() {
24 echo "usage: `basename $0` -release [-rebranch]"
25 echo "usage: `basename $0` -release -rc "
25 echo "usage: `basename $0` -release [-rebranch] [-dry-run]"
26 echo "usage: `basename $0` -release -rc [-dry-run]"
2627 echo " "
2728 echo " -release The version number of the release"
2829 echo " -rc The release candidate number"
2930 echo " -rebranch Remove existing branch, if present, before branching"
3031 echo " -final Tag final release candidate"
32 echo " -dry-run Make no changes to the repository, just print the commands"
3133 }
3234
3335 function tag_version() {
3739 if [ $rebranch = "no" ]; then
3840 continue
3941 fi
40 svn remove -m "Removing old release_$branch_release branch for rebranching." \
42 ${dryrun} svn remove -m "Removing old release_$branch_release branch for rebranching." \
4143 $base_url/$proj/branches/release_$branch_release
4244 fi
43 svn copy -m "Creating release_$branch_release branch" \
45 ${dryrun} svn copy -m "Creating release_$branch_release branch" \
4446 $base_url/$proj/trunk \
4547 $base_url/$proj/branches/release_$branch_release
4648 done
5153 set -x
5254 for proj in $projects ; do
5355 if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release > /dev/null 2>&1 ; then
54 svn mkdir -m "Creating release directory for release_$tag_release." $base_url/$proj/tags/RELEASE_$tag_release
56 ${dryrun} svn mkdir -m "Creating release directory for release_$tag_release." $base_url/$proj/tags/RELEASE_$tag_release
5557 fi
5658 if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release/$rc > /dev/null 2>&1 ; then
57 svn copy -m "Creating release candidate $rc from release_$tag_release branch" \
59 ${dryrun} svn copy -m "Creating release candidate $rc from release_$tag_release branch" \
5860 $base_url/$proj/branches/release_$branch_release \
5961 $base_url/$proj/tags/RELEASE_$tag_release/$rc
6062 fi
7779 ;;
7880 -final | --final )
7981 rc="final"
82 ;;
83 -dry-run | --dry-run )
84 dryrun="echo"
8085 ;;
8186 -h | --help | -help )
8287 usage