[PATCH] D53467: Branch/tag all projects with a single commit in release-tagging script.
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 19 18:33:16 PDT 2018
jyknight created this revision.
jyknight added a reviewer: hans.
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.
https://reviews.llvm.org/D53467
Files:
llvm/utils/release/tag.sh
Index: llvm/utils/release/tag.sh
===================================================================
--- llvm/utils/release/tag.sh
+++ llvm/utils/release/tag.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#===-- tag.sh - Tag the LLVM release candidates ----------------------------===#
#
# The LLVM Compiler Infrastructure
@@ -17,7 +17,8 @@
release=""
rc=""
rebranch="no"
-projects="llvm cfe test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp libunwind debuginfo-tests"
+# All the projects that make it into the monorepo, plus test-suite.
+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"
dryrun=""
revision="HEAD"
@@ -36,35 +37,49 @@
}
tag_version() {
+ local remove_args=()
+ local create_args=()
set -x
- for proj in $projects; do
+ for proj in $projects; do
if svn ls $base_url/$proj/branches/release_$branch_release > /dev/null 2>&1 ; then
if [ $rebranch = "no" ]; then
continue
fi
- ${dryrun} svn remove -m "Removing old release_$branch_release branch for rebranching." \
- $base_url/$proj/branches/release_$branch_release
+ remove_args+=(rm "$proj/branches/release_$branch_release")
fi
- ${dryrun} svn copy -m "Creating release_$branch_release branch off revision ${revision}" \
- -r ${revision} \
- $base_url/$proj/trunk \
- $base_url/$proj/branches/release_$branch_release
+ create_args+=(cp ${revision} "$proj/trunk" "$proj/branches/release_$branch_release")
done
+ if [[ ${#remove_args[@]} -gt 0 ]]; then
+ ${dryrun} svnmucc --root-url "$base_url" \
+ -m "Removing old release_$branch_release branch for rebranching." \
+ "${remove_args[@]}"
+ fi
+ if [[ ${#create_args[@]} -gt 0 ]]; then
+ ${dryrun} svnmucc --root-url "$base_url" \
+ -m "Creating release_$branch_release branch off revision ${revision}" \
+ "${create_args[@]}"
+ fi
set +x
}
tag_release_candidate() {
+ local create_args=()
set -x
for proj in $projects ; do
if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release > /dev/null 2>&1 ; then
- ${dryrun} svn mkdir -m "Creating release directory for release_$tag_release." $base_url/$proj/tags/RELEASE_$tag_release
+ create_args+=(mkdir "$proj/tags/RELEASE_$tag_release")
fi
if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release/$rc > /dev/null 2>&1 ; then
- ${dryrun} svn copy -m "Creating release candidate $rc from release_$tag_release branch" \
- $base_url/$proj/branches/release_$branch_release \
- $base_url/$proj/tags/RELEASE_$tag_release/$rc
+ create_args+=(cp HEAD
+ "$proj/branches/release_$branch_release"
+ "$proj/tags/RELEASE_$tag_release/$rc")
fi
done
+ if [[ ${#create_args[@]} -gt 0 ]]; then
+ ${dryrun} svnmucc --root-url "$base_url" \
+ -m "Creating release candidate $rc from release_$tag_release branch" \
+ "${create_args[@]}"
+ fi
set +x
}
@@ -104,7 +119,7 @@
shift
done
-if [ "x$release" = "x" ]; then
+if [ "$release" = "" ]; then
echo "error: need to specify a release version"
echo
usage
@@ -114,7 +129,7 @@
branch_release=`echo $release | sed -e 's,\([0-9]*\.[0-9]*\).*,\1,' | sed -e 's,\.,,g'`
tag_release=`echo $release | sed -e 's,\.,,g'`
-if [ "x$rc" = "x" ]; then
+if [ "$rc" = "" ]; then
tag_version
else
if [ "$revision" != "HEAD" ]; then
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53467.170291.patch
Type: text/x-patch
Size: 3783 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181020/cb0883f3/attachment.bin>
More information about the llvm-commits
mailing list