v0.0.88
This commit is contained in:
parent
22ce2d26f3
commit
ec4dba173f
@ -7,6 +7,20 @@ set -o pipefail # Return value of a pipeline is the value of the last (rightmos
|
|||||||
IFS=$'\n\t' # Set $IFS to only newline and tab.
|
IFS=$'\n\t' # Set $IFS to only newline and tab.
|
||||||
|
|
||||||
|
|
||||||
|
function black() { echo -e "\x1B[30m $1 \x1B[0m"; }
|
||||||
|
function red() { echo -e "\x1B[31m $1 \x1B[0m"; }
|
||||||
|
function green() { echo -e "\x1B[32m $1 \x1B[0m"; }
|
||||||
|
function yellow(){ echo -e "\x1B[33m $1 \x1B[0m"; }
|
||||||
|
function blue() { echo -e "\x1B[34m $1 \x1B[0m"; }
|
||||||
|
function purple(){ echo -e "\x1B[35m $1 \x1B[0m"; }
|
||||||
|
function cyan() { echo -e "\x1B[36m $1 \x1B[0m"; }
|
||||||
|
function white() { echo -e "\x1B[37m $1 \x1B[0m"; }
|
||||||
|
|
||||||
|
if [ "$( git rev-parse --abbrev-ref HEAD )" != "master" ]; then
|
||||||
|
>&2 red "[ERROR] Can only create versions of <master>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
curr_vers=$(git describe --tags --abbrev=0 | sed 's/v//g')
|
curr_vers=$(git describe --tags --abbrev=0 | sed 's/v//g')
|
||||||
|
|
||||||
next_ver=$(echo "$curr_vers" | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}')
|
next_ver=$(echo "$curr_vers" | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}')
|
||||||
|
Loading…
Reference in New Issue
Block a user