fix(build): Guess new version in bump.sh
This commit is contained in:
parent
a04bdb31f0
commit
4c7943b9bb
8
bump.sh
8
bump.sh
@ -1,9 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Use passed argument as new tag
|
||||
[ $# -eq 1 ] && {
|
||||
if [ $# -eq 0 ]; then
|
||||
version=$(git describe --tags --abbrev=0)
|
||||
patch=${version##*.}
|
||||
set -- "${version%.*}.$((patch+1))"
|
||||
fi
|
||||
|
||||
git tag "$@" || exit 1
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2016
|
||||
tag_prev=$(git tag -l | tail -2 | head -1)
|
||||
|
Loading…
Reference in New Issue
Block a user