From 4b7bd7bcb67f335511a1d6c0b46b82a3132cb983 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Thu, 22 Dec 2016 00:23:00 +0100 Subject: [PATCH] fix(bump.sh): Read previous tag --- bump.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bump.sh b/bump.sh index da56f533..de4d1ad4 100755 --- a/bump.sh +++ b/bump.sh @@ -9,10 +9,8 @@ fi git tag "$@" || exit 1 -# shellcheck disable=SC2016 -tag_curr=$(git describe --tags --abbrev=0) -tag_curr_patch="${tag_curr##*.}" -tag_prev="${tag_curr%.*}.$((tag_curr_patch-1))" +tag_curr="$(git tag --sort=version:refname | tail -1)" +tag_prev="$(git tag --sort=version:refname | tail -2 | head -1)" ./version.sh "$tag_curr"