From fe6ad9692a905d41da381c5faa99b773acca5eee Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Fri, 17 Jul 2015 10:40:40 +0000 Subject: [PATCH] test-release.sh: Add ability to do a test build using the trunk or branches. Summary: Adds '--svn-path BRANCH' that causes the script to export the specified path from each project. Otherwise the tag specified by -release, -rc, etc. will be used. The version portion of the package name will be 'test-$path' (any forward slashes in the branch name are replaced with underscores), for example: -svn-path trunk => clang+llvm-test-trunk-mips-linux-gnu.tar.xz -svn-path branches/release_35 => clang+llvm-test-branches_release_35-mips-linux-gnu.tar.xz This is primarily useful for bringing new release packages up to standard without needing to create and maintain a tag for the purpose. Reviewers: tstellarAMD, hans Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6563 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242518 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/release/test-release.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/utils/release/test-release.sh b/utils/release/test-release.sh index c622e269584..465a0326342 100755 --- a/utils/release/test-release.sh +++ b/utils/release/test-release.sh @@ -35,6 +35,7 @@ do_compare="yes" BuildDir="`pwd`" use_autoconf="no" ExtraConfigureFlags="" +ExportBranch="" function usage() { echo "usage: `basename $0` -release X.Y.Z -rc NUM [OPTIONS]" @@ -52,6 +53,8 @@ function usage() { echo " -use-gzip Use gzip instead of xz." echo " -configure-flags FLAGS Extra flags to pass to the configure step." echo " -use-autoconf Use autoconf instead of cmake" + echo " -svn-path DIR Use the specified DIR instead of a release." + echo " For example -svn-path trunk or -svn-path branches/release_37" } if [ `uname -s` = "Darwin" ]; then @@ -73,6 +76,16 @@ while [ $# -gt 0 ]; do -final | --final ) RC=final ;; + -svn-path | --svn-path ) + shift + Release="test" + Release_no_dot="test" + ExportBranch="$1" + RC="`echo $ExportBranch | sed -e 's,/,_,g'`" + echo "WARNING: Using the branch $ExportBranch instead of a release tag" + echo " This is intended to aid new packagers in trialing " + echo " builds without requiring a tag to be created first" + ;; -triple | --triple ) shift Triple="$1" @@ -132,6 +145,9 @@ if [ -z "$RC" ]; then echo "error: no release candidate number specified" exit 1 fi +if [ -z "$ExportBranch" ]; then + ExportBranch="tags/RELEASE_$Release_no_dot/$RC" +fi if [ -z "$Triple" ]; then echo "error: no target triple specified" exit 1 @@ -187,8 +203,8 @@ function check_valid_urls() { for proj in $projects ; do echo "# Validating $proj SVN URL" - if ! svn ls $Base_url/$proj/tags/RELEASE_$Release_no_dot/$RC > /dev/null 2>&1 ; then - echo "$proj $Release release candidate $RC doesn't exist!" + if ! svn ls $Base_url/$proj/$ExportBranch > /dev/null 2>&1 ; then + echo "$proj does not have a $ExportBranch branch/tag!" exit 1 fi done @@ -200,7 +216,7 @@ function export_sources() { for proj in $projects ; do echo "# Exporting $proj $Release-$RC sources" - if ! svn export -q $Base_url/$proj/tags/RELEASE_$Release_no_dot/$RC $proj.src ; then + if ! svn export -q $Base_url/$proj/$ExportBranch $proj.src ; then echo "error: failed to export $proj project" exit 1 fi