From 797a7f05fff190ebcb1e3a1a46fb5ac32936c295 Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Fri, 19 Jun 2015 00:01:43 +0200 Subject: [PATCH] use version in branchname if branch is master --- tools/build/build_asf.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/build/build_asf.sh b/tools/build/build_asf.sh index 45b07aa158d..025eec5f81c 100755 --- a/tools/build/build_asf.sh +++ b/tools/build/build_asf.sh @@ -118,8 +118,13 @@ git clean -f #create a RC branch RELEASE_BRANCH="RC"`date +%Y%m%dT%H%M` -git branch $branch-$RELEASE_BRANCH -git checkout $branch-$RELEASE_BRANCH +if [ "$branch" = "master" ]; then + BRANCHNAME=$version-$RELEASE_BRANCH +else + BRANCHNAME=$branch-$RELEASE_BRANCH +fi +git branch $BRANCHNAME +git checkout $BRANCHNAME echo 'commit changes' @@ -129,7 +134,7 @@ export commitsh=`git show HEAD | head -n 1 | cut -d ' ' -f 2` echo "committed as $commitsh" echo 'archiving' -git archive --format=tar --prefix=apache-cloudstack-$version-src/ $branch-$RELEASE_BRANCH > $outputdir/apache-cloudstack-$version-src.tar +git archive --format=tar --prefix=apache-cloudstack-$version-src/ $BRANCHNAME > $outputdir/apache-cloudstack-$version-src.tar bzip2 $outputdir/apache-cloudstack-$version-src.tar cd $outputdir