Skip to content

Commit

Permalink
Fix ci version script when filtering tags (#10539)
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseguy authored May 14, 2024
1 parent 78e1084 commit c79248e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,20 +336,20 @@ jobs:
echo "Tags at commit:\n$tags_at_commit"
filtered_tags=$(echo "$tags_at_commit" | grep "^<<parameters.docker_name>>/" || true)
echo "Filtered tags:\n$filtered_tags"
echo "Filtered tags: $filtered_tags"
if [ -z "$filtered_tags" ]; then
export GIT_VERSION="untagged"
else
sorted_tags=$(echo "$filtered_tags" | sed "s/<<parameters.docker_name>>\///" | sort -V)
echo "Sorted tags:\n$sorted_tags"
echo "Sorted tags: $sorted_tags"
# prefer full release tag over "-rc" release candidate tag if both exist
full_release_tag=$(echo "$sorted_tags" | grep -v -- "-rc" || true)
if [ -z "$full_release_tag" ]; then
export GIT_VERSION=$(echo "$sorted_tags" | tail -n 1)
else
export GIT_VERSION=$(echo "$full_release_tag")
export GIT_VERSION=$(echo "$full_release_tag" | tail -n 1)
fi
fi
Expand Down

0 comments on commit c79248e

Please sign in to comment.