Skip to content

Commit

Permalink
fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
obezpalko committed May 22, 2024
1 parent 35b26d0 commit 88bc919
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion get-new-tag/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 88bc919

Please sign in to comment.