Skip to content

Commit 797a7f0

Browse files
committed
use version in branchname if branch is master
1 parent b9dd67c commit 797a7f0

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

tools/build/build_asf.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,13 @@ git clean -f
118118

119119
#create a RC branch
120120
RELEASE_BRANCH="RC"`date +%Y%m%dT%H%M`
121-
git branch $branch-$RELEASE_BRANCH
122-
git checkout $branch-$RELEASE_BRANCH
121+
if [ "$branch" = "master" ]; then
122+
BRANCHNAME=$version-$RELEASE_BRANCH
123+
else
124+
BRANCHNAME=$branch-$RELEASE_BRANCH
125+
fi
126+
git branch $BRANCHNAME
127+
git checkout $BRANCHNAME
123128

124129

125130
echo 'commit changes'
@@ -129,7 +134,7 @@ export commitsh=`git show HEAD | head -n 1 | cut -d ' ' -f 2`
129134
echo "committed as $commitsh"
130135

131136
echo 'archiving'
132-
git archive --format=tar --prefix=apache-cloudstack-$version-src/ $branch-$RELEASE_BRANCH > $outputdir/apache-cloudstack-$version-src.tar
137+
git archive --format=tar --prefix=apache-cloudstack-$version-src/ $BRANCHNAME > $outputdir/apache-cloudstack-$version-src.tar
133138
bzip2 $outputdir/apache-cloudstack-$version-src.tar
134139

135140
cd $outputdir

0 commit comments

Comments
 (0)