Skip to content

Commit

Permalink
fix pre-release bumps when tag already exist
Browse files Browse the repository at this point in the history
  • Loading branch information
sbe-arg committed May 11, 2022
1 parent 89b375f commit 3f93f8d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ echo "pre_release = $pre_release"

# fetch tags
git fetch --tags
tagFmt="^v?[0-9]+\.[0-9]+\.[0-9]+$"
preTagFmt="^v?[0-9]+\.[0-9]+\.[0-9]+(-$suffix\.[0-9]+)$"

tagFmt="^v$[0-9]+\.[0-9]+\.[0-9]+$"
preTagFmt="^v[0-9]+\.[0-9]+\.[0-9]+(-$suffix\.[0-9]+)$"

# get latest tag that looks like a semver (with or without v)
case "$tag_context" in
Expand All @@ -62,7 +62,6 @@ case "$tag_context" in
exit 1;;
esac


# if there are none, start tags at INITIAL_VERSION which defaults to 0.0.0
if [ -z "$tag" ]
then
Expand All @@ -83,12 +82,7 @@ then
fi
fi
else
if $with_v
then
log=$(git log v${tag}..HEAD --pretty='%B' --)
else
log=$(git log ${tag}..HEAD --pretty='%B' --)
fi
log=$(git log ${tag}..HEAD --pretty='%B' --)
fi

# get current commit hash for tag
Expand Down

0 comments on commit 3f93f8d

Please sign in to comment.