Skip to content

Commit

Permalink
Merge pull request #13 from thandayuthapani/master
Browse files Browse the repository at this point in the history
Changes to cut tag in pipeline
  • Loading branch information
tianxiaoliang authored Sep 18, 2018
2 parents 2af4aee + 3fe2c58 commit 27a2067
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ GO111MODULE=on go mod download
GO111MODULE=on go mod vendor
go build -o mesher -a

if [ $VERSION != "latest" ]; then
cd $PROJECT_DIR/mesher
git tag -a $TAG_VERSION -m "$TAG_MESSAGE"
git push origin $TAG_VERSION
fi

export WORK_DIR=$BUILD_DIR/src/$repo/$project/mesher

Expand Down Expand Up @@ -68,5 +73,12 @@ tar zcvf $pkg_name licenses conf mesher VERSION
if [ $JOB_NAME != "" ]; then
cp $release_dir/$pkg_name /var/lib/jenkins/mesher-release
fi

if [ $VERSION != "latest" ]; then
date=$(date +%Y-%m-%d)
DIR_NAME="mesher-release-$date"
mkdir -p /var/lib/jenkins/userContent/mesher-release/$DIR_NAME
cp $release_dir/$pkg_name /var/lib/jenkins/userContent/mesher-release/$DIR_NAME
fi
tar zcvf $WORK_DIR/mesher.tar.gz licenses conf start.sh mesher VERSION
exit 0

0 comments on commit 27a2067

Please sign in to comment.