llvm.org GIT mirror llvm / 3593f97
Branch/tag all projects with a single commit in release-tagging script. This change updates the release script to use svnmucc to create all the branches with one commit. This will ensure that the git tag won't bounce around if the git migration runs in-between separate commits creating a branch. Additionally, update the list of projects to include all of the projects in the monorepo, plus test-suite. Differential Revision: https://reviews.llvm.org/D53467 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346550 91177308-0d34-0410-b5e6-96231b3b80d8 James Y Knight 1 year, 11 months ago
1 changed file(s) with 31 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
None #!/bin/sh
0 #!/bin/bash
11 #===-- tag.sh - Tag the LLVM release candidates ----------------------------===#
22 #
33 # The LLVM Compiler Infrastructure
1616 release=""
1717 rc=""
1818 rebranch="no"
19 projects="llvm cfe test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp libunwind debuginfo-tests"
19 # All the projects that make it into the monorepo, plus test-suite.
20 projects="monorepo-root cfe clang-tools-extra compiler-rt debuginfo-tests libclc libcxx libcxxabi libunwind lld lldb llgo llvm openmp parallel-libs polly pstl test-suite"
2021 dryrun=""
2122 revision="HEAD"
2223
3536 }
3637
3738 tag_version() {
39 local remove_args=()
40 local create_args=()
41 local message_prefix
3842 set -x
39 for proj in $projects; do
43 for proj in $projects; do
4044 if svn ls $base_url/$proj/branches/release_$branch_release > /dev/null 2>&1 ; then
4145 if [ $rebranch = "no" ]; then
4246 continue
4347 fi
44 ${dryrun} svn remove -m "Removing old release_$branch_release branch for rebranching." \
45 $base_url/$proj/branches/release_$branch_release
48 remove_args+=(rm "$proj/branches/release_$branch_release")
4649 fi
47 ${dryrun} svn copy -m "Creating release_$branch_release branch off revision ${revision}" \
48 -r ${revision} \
49 $base_url/$proj/trunk \
50 $base_url/$proj/branches/release_$branch_release
50 create_args+=(cp ${revision} "$proj/trunk" "$proj/branches/release_$branch_release")
5151 done
52 if [[ ${#remove_args[@]} -gt 0 ]]; then
53 message_prefix="Removing and recreating"
54 else
55 message_prefix="Creating"
56 fi
57 if [[ ${#create_args[@]} -gt 0 ]]; then
58 ${dryrun} svnmucc --root-url "$base_url" \
59 -m "$message_prefix release_$branch_release branch off revision ${revision}" \
60 "${remove_args[@]}" "${create_args[@]}"
61 fi
5262 set +x
5363 }
5464
5565 tag_release_candidate() {
66 local create_args=()
5667 set -x
5768 for proj in $projects ; do
5869 if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release > /dev/null 2>&1 ; then
59 ${dryrun} svn mkdir -m "Creating release directory for release_$tag_release." $base_url/$proj/tags/RELEASE_$tag_release
70 create_args+=(mkdir "$proj/tags/RELEASE_$tag_release")
6071 fi
6172 if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release/$rc > /dev/null 2>&1 ; then
62 ${dryrun} svn copy -m "Creating release candidate $rc from release_$tag_release branch" \
63 $base_url/$proj/branches/release_$branch_release \
64 $base_url/$proj/tags/RELEASE_$tag_release/$rc
73 create_args+=(cp HEAD
74 "$proj/branches/release_$branch_release"
75 "$proj/tags/RELEASE_$tag_release/$rc")
6576 fi
6677 done
78 if [[ ${#create_args[@]} -gt 0 ]]; then
79 ${dryrun} svnmucc --root-url "$base_url" \
80 -m "Creating release candidate $rc from release_$tag_release branch" \
81 "${create_args[@]}"
82 fi
6783 set +x
6884 }
6985
103119 shift
104120 done
105121
106 if [ "x$release" = "x" ]; then
122 if [ "$release" = "" ]; then
107123 echo "error: need to specify a release version"
108124 echo
109125 usage
113129 branch_release=`echo $release | sed -e 's,\([0-9]*\.[0-9]*\).*,\1,' | sed -e 's,\.,,g'`
114130 tag_release=`echo $release | sed -e 's,\.,,g'`
115131
116 if [ "x$rc" = "x" ]; then
132 if [ "$rc" = "" ]; then
117133 tag_version
118134 else
119135 if [ "$revision" != "HEAD" ]; then