diff options
author | Stephen Hines <srhines@google.com> | 2015-04-01 18:49:24 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-01 18:49:26 +0000 |
commit | 3fa16bd6062e23bcdb82ed4dd965674792e6b761 (patch) | |
tree | 9348fc507292f7e8715d22d64ce5a32131b4f875 /utils/release/tag.sh | |
parent | beed47390a60f6f0c77532b3d3f76bb47ef49423 (diff) | |
parent | ebe69fe11e48d322045d5949c83283927a0d790b (diff) | |
download | external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.zip external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.tar.gz external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.tar.bz2 |
Merge "Update aosp/master LLVM for rebase to r230699."
Diffstat (limited to 'utils/release/tag.sh')
-rwxr-xr-x | utils/release/tag.sh | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/utils/release/tag.sh b/utils/release/tag.sh index 390acaf..503413b 100755 --- a/utils/release/tag.sh +++ b/utils/release/tag.sh @@ -18,17 +18,21 @@ release="" rc="" rebranch="no" projects="llvm cfe dragonegg test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp" +dryrun="" +revision="HEAD" 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] [-revision <num>] [-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 " -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 " -revision <num> Revision to branch off (default: HEAD)" + echo " -dry-run Make no changes to the repository, just print the commands" } function tag_version() { @@ -38,10 +42,11 @@ 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 off revision ${revision}" \ + -r ${revision} \ $base_url/$proj/trunk \ $base_url/$proj/branches/release_$branch_release done @@ -52,10 +57,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 +84,13 @@ while [ $# -gt 0 ]; do -final | --final ) rc="final" ;; + -revision | --revision ) + shift + revision="$1" + ;; + -dry-run | --dry-run ) + dryrun="echo" + ;; -h | --help | -help ) usage exit 0 @@ -105,6 +117,13 @@ tag_release=`echo $release | sed -e 's,\.,,g'` if [ "x$rc" = "x" ]; then tag_version else + if [ "$revision" != "HEAD" ]; then + echo "error: cannot use -revision with -rc" + echo + usage + exit 1 + fi + tag_release_candidate fi |