mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-21 20:34:57 +09:00
Next tag script
This commit is contained in:
1 parent
a9974e3a44
commit
4008a5a4b4
2 files changed
+32
No files matched your search
@@ -63,3 +63,11 @@ release: ## App release
|
||||
npm install
|
||||
grunt
|
||||
ant release
|
||||
|
||||
tag: ## Tag new release on GitHub
|
||||
sh ./bin/next-tag.sh
|
||||
#NEW_TAG=$(shell ./bin/next-tag.sh);
|
||||
#echo $(NEW_TAG)
|
||||
#git tag $NEW_TAG
|
||||
#git push --tags
|
||||
#git push
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
#get highest tag number
|
||||
VERSION=`git describe --abbrev=0 --tags 2>/dev/null`
|
||||
|
||||
if [ -z $VERSION ];then
|
||||
NEW_TAG="1.0.0"
|
||||
fi
|
||||
|
||||
#replace . with space so can split into an array
|
||||
VERSION_BITS=(${VERSION//./ })
|
||||
|
||||
#get number parts and increase last one by 1
|
||||
VNUM1=${VERSION_BITS[0]}
|
||||
VNUM2=${VERSION_BITS[1]}
|
||||
VNUM3=${VERSION_BITS[2]}
|
||||
VNUM3=$((VNUM3+1))
|
||||
|
||||
#create new tag
|
||||
NEW_TAG="${VNUM1}.${VNUM2}.${VNUM3}"
|
||||
|
||||
echo $NEW_TAG
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user