mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 18:50:13 +00:00
Changes to Version and Build Numbering
This commit is contained in:
parent
815ef62018
commit
5639f514f4
1 changed files with 16 additions and 9 deletions
|
@ -1,15 +1,22 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
BUILDDATE=$(date +"%Y-%m-%d")
|
#BUILDDATE=$(date +"%Y-%m-%d")
|
||||||
|
YEAR=$(date +"%Y")
|
||||||
|
MONTH=$(date +"%m")
|
||||||
git config --global user.email "${GIT_EMAIL}"
|
git config --global user.email "${GIT_EMAIL}"
|
||||||
git config --global user.name "${GIT_NAME}"
|
git config --global user.name "${GIT_NAME}"
|
||||||
git config --global push.default simple
|
git config --global push.default simple
|
||||||
git remote add origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
|
git remote add origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
|
||||||
export GIT_TAG=$BUILDDATE.Build-$TRAVIS_BUILD_NUMBER
|
export GIT_TAG=V3.$YEAR-$MONTH.$TRAVIS_BUILD_NUMBER
|
||||||
git fetch --tags
|
#git fetch --tags
|
||||||
msg="Tag Generated from TravisCI for build $TRAVIS_BUILD_NUMBER"
|
#msg="Tag Generated from TravisCI for build $TRAVIS_BUILD_NUMBER"
|
||||||
if git tag $GIT_TAG -a -m "$msg" 2>/dev/null; then
|
#if git tag $GIT_TAG -a -m "$msg" 2>/dev/null; then
|
||||||
git tag $GIT_TAG -a -m "Tag Generated from TravisCI for build $TRAVIS_BUILD_NUMBER"
|
#git tag $GIT_TAG -a -m "Tag Generated from TravisCI for build $TRAVIS_BUILD_NUMBER"
|
||||||
git push origin master && git push origin master --tags
|
#git push origin master && git push origin master --tags
|
||||||
ls -aR
|
#ls -aR
|
||||||
else echo Tag already exists!; fi
|
#else echo Tag already exists!; fi
|
||||||
|
|
||||||
|
# Tag our release
|
||||||
|
git tag $GIT_TAG -a -m "V3.$YEAR.$MONTH.$TRAVIS_BUILD_NUMBER"
|
||||||
|
|
||||||
|
# Push our commit and tags back to the repo
|
||||||
|
sudo git push origin master && git push origin master --tags
|
||||||
|
|
Loading…
Add table
Reference in a new issue