From 88bc9193a8025fa4a8caa957f6dc6582ca3cb1c8 Mon Sep 17 00:00:00 2001 From: Alex Bezpalko Date: Wed, 22 May 2024 17:52:07 +0200 Subject: [PATCH] fix logic --- get-new-tag/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-new-tag/action.yml b/get-new-tag/action.yml index 07b3c81..8f9adc5 100644 --- a/get-new-tag/action.yml +++ b/get-new-tag/action.yml @@ -52,7 +52,7 @@ runs: new_tag="${parent_prefix}.${parent_minor:-0}.$(( ${parent_patch:-0} + ${{ inputs.increment }} ))${parent_extra}" # check if new tag exist new_tag="$( git tag --list "${new_tag}" )" - if [ -n "${tag}" ] ; then + if [ -n "${new_tag}" ] ; then # tag found, we need increase patch latest_tag_patch="$( git tag --list "${parent_prefix}.${parent_minor:-0}.*${parent_extra}" | tail -n 1 | sed -r 's/^[^.][0-9]*\.[0-9]+\.([0-9]+)[^0-9]?.*$/\1/' )" new_tag="${parent_prefix}.${parent_minor:-0}.$(( ${latest_tag_patch:-0} + ${{ inputs.increment }} ))${parent_extra}"