Skip to content

Commit

Permalink
Update eksa_version.sh (#8539)
Browse files Browse the repository at this point in the history
  • Loading branch information
d8660091 authored Jul 26, 2024
1 parent e24df70 commit 69f4827
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/eksa_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function eksa-version::get_next_eksa_version_for_ancestor() {
# For a release branch, get the latest tag for the release minor version and bump the patch version
# If there is not tag yet, use latest tag by date but bumping the minor version and using 0 as the patch
# Silence stdeer as the command will fail if there are no tags
latest_tag=$(git describe --tags --match "v$(echo "$ancestor_branch" | sed 's/release-//').*" "$(git rev-list --tags='v*.*.*' --max-count=1)" 2>/dev/null)
latest_tag=$(git tag -l "v${ancestor_branch#release-}.*" | sort -V | tail -n 1)
if [[ -z "$latest_tag" ]]; then
latest_tag=$(git describe --tags "$(git rev-list --tags='v*.*.*' --max-count=1)")
release_version=$(echo "${latest_tag}" | awk -F. -v OFS=. '{$2++; $3=0; print}')
Expand All @@ -94,4 +94,4 @@ function eksa-version::latest_release_verison_in_manifest() {
local release_version
release_version=$(curl -s -L "$manifest_file" | yq '.spec.latestVersion')
echo "$release_version"
}
}

0 comments on commit 69f4827

Please sign in to comment.