Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ case "$tag_context" in
git_refs=$(git for-each-ref --sort=-v:refname --format '%(refname:lstrip=2)')
;;
*branch*)
git_refs=$(git tag --list --merged HEAD --sort=-committerdate)
git_refs=$(git tag --list --merged HEAD --sort=committerdate)
;;
* ) echo "Unrecognised context"
exit 1;;
Expand All @@ -119,8 +119,8 @@ esac
# get the latest tag that looks like a semver (with or without v)
matching_tag_refs=$( (grep -E "$tagFmt" <<< "$git_refs") || true)
matching_pre_tag_refs=$( (grep -E "$preTagFmt" <<< "$git_refs") || true)
tag=$(head -n 1 <<< "$matching_tag_refs")
pre_tag=$(head -n 1 <<< "$matching_pre_tag_refs")
tag=$(tail -n 1 <<< "$matching_tag_refs")
pre_tag=$(tail -n 1 <<< "$matching_pre_tag_refs")

# if there are none, start tags at initial version
if [ -z "$tag" ]
Expand Down