[llvm] r225735 - Release tag script: add -dry-run flag
Hans Wennborg
hans at hanshq.net
Mon Jan 12 16:07:22 PST 2015
Author: hans
Date: Mon Jan 12 18:07:22 2015
New Revision: 225735
URL: http://llvm.org/viewvc/llvm-project?rev=225735&view=rev
Log:
Release tag script: add -dry-run flag
Modified:
llvm/trunk/utils/release/tag.sh
Modified: llvm/trunk/utils/release/tag.sh
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/release/tag.sh?rev=225735&r1=225734&r2=225735&view=diff
==============================================================================
--- llvm/trunk/utils/release/tag.sh (original)
+++ llvm/trunk/utils/release/tag.sh Mon Jan 12 18:07:22 2015
@@ -18,17 +18,19 @@ release=""
rc=""
rebranch="no"
projects="llvm cfe dragonegg test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp"
+dryrun=""
base_url="https://llvm.org/svn/llvm-project"
function usage() {
- echo "usage: `basename $0` -release <num> [-rebranch]"
- echo "usage: `basename $0` -release <num> -rc <num>"
+ echo "usage: `basename $0` -release <num> [-rebranch] [-dry-run]"
+ echo "usage: `basename $0` -release <num> -rc <num> [-dry-run]"
echo " "
echo " -release <num> The version number of the release"
echo " -rc <num> The release candidate number"
echo " -rebranch Remove existing branch, if present, before branching"
echo " -final Tag final release candidate"
+ echo " -dry-run Make no changes to the repository, just print the commands"
}
function tag_version() {
@@ -38,10 +40,10 @@ function tag_version() {
if [ $rebranch = "no" ]; then
continue
fi
- svn remove -m "Removing old release_$branch_release branch for rebranching." \
+ ${dryrun} svn remove -m "Removing old release_$branch_release branch for rebranching." \
$base_url/$proj/branches/release_$branch_release
fi
- svn copy -m "Creating release_$branch_release branch" \
+ ${dryrun} svn copy -m "Creating release_$branch_release branch" \
$base_url/$proj/trunk \
$base_url/$proj/branches/release_$branch_release
done
@@ -52,10 +54,10 @@ function tag_release_candidate() {
set -x
for proj in $projects ; do
if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release > /dev/null 2>&1 ; then
- svn mkdir -m "Creating release directory for release_$tag_release." $base_url/$proj/tags/RELEASE_$tag_release
+ ${dryrun} svn mkdir -m "Creating release directory for release_$tag_release." $base_url/$proj/tags/RELEASE_$tag_release
fi
if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release/$rc > /dev/null 2>&1 ; then
- svn copy -m "Creating release candidate $rc from release_$tag_release branch" \
+ ${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
fi
@@ -79,6 +81,9 @@ while [ $# -gt 0 ]; do
-final | --final )
rc="final"
;;
+ -dry-run | --dry-run )
+ dryrun="echo"
+ ;;
-h | --help | -help )
usage
exit 0
More information about the llvm-commits
mailing list