diff --git a/bump.sh b/bump.sh index c11a99c4..6bf579fe 100755 --- a/bump.sh +++ b/bump.sh @@ -10,8 +10,9 @@ fi git tag "$@" || exit 1 # shellcheck disable=SC2016 -tag_prev=$(git tag -l | tail -2 | head -1) -tag_curr=$(git tag -l | tail -1) +tag_curr=$(git describe --tags --abbrev=0) +tag_curr_patch="${tag_curr##*.}" +tag_prev="${tag_curr%.*}.$((tag_curr_patch-1))" ./version.sh "$tag_curr"