[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 Nov 9 11:47:55 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL346550: Branch/tag all projects with a single commit in release-tagging script. (authored by jyknight, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D53467?vs=172839&id=173400#toc
Repository:
rL LLVM
https://reviews.llvm.org/D53467
Files:
llvm/trunk/utils/release/tag.sh
Index: llvm/trunk/utils/release/tag.sh
===================================================================
--- llvm/trunk/utils/release/tag.sh
+++ llvm/trunk/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,50 @@
}
tag_version() {
+ local remove_args=()
+ local create_args=()
+ local message_prefix
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
+ message_prefix="Removing and recreating"
+ else
+ message_prefix="Creating"
+ fi
+ if [[ ${#create_args[@]} -gt 0 ]]; then
+ ${dryrun} svnmucc --root-url "$base_url" \
+ -m "$message_prefix release_$branch_release branch off revision ${revision}" \
+ "${remove_args[@]}" "${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 +120,7 @@
shift
done
-if [ "x$release" = "x" ]; then
+if [ "$release" = "" ]; then
echo "error: need to specify a release version"
echo
usage
@@ -114,7 +130,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.173400.patch
Type: text/x-patch
Size: 3783 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181109/24b33122/attachment.bin>
More information about the llvm-commits
mailing list