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