Skip to content

Commit e0ea627

Browse files
committed
Fix latest tag identification in release pipeline
1 parent 98ce1c5 commit e0ea627

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

scripts/prepare-release.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function should_abort_prepare() {
125125
return 1
126126
fi
127127

128-
latest_tag=$(git_run "${foundation_sdk_path}" describe --tags --abbrev=0 2>/dev/null || echo 'v0.0.0')
128+
latest_tag=$(git_run "${foundation_sdk_path}" describe --tags --exclude 'go/*' --abbrev=0 2>/dev/null || echo 'v0.0.0')
129129
current_marker=$(cat "${release_marker}")
130130

131131
# The release marker and latest tags are equal: we just merged the
@@ -195,7 +195,7 @@ git_run "${KIND_REGISTRY_PATH}" pull --ff-only origin main
195195
release_branch_exists=$(git_has_branch "${foundation_sdk_path}" "${release_branch}")
196196
if [ "$release_branch_exists" != "0" ]; then
197197
debug "No existing release branch: next version will be determined from the latest tag"
198-
latest_tag=$(git_run "${foundation_sdk_path}" describe --tags --abbrev=0 2>/dev/null || echo 'v0.0.0')
198+
latest_tag=$(git_run "${foundation_sdk_path}" describe --tags --exclude 'go/*' --abbrev=0 2>/dev/null || echo 'v0.0.0')
199199
next_tag=$(next_version "${latest_tag}" patch)
200200
else
201201
debug "Existing release branch found: next version will be read from it"
@@ -208,6 +208,7 @@ else
208208
git_run "${foundation_sdk_path}" branch -D "${release_branch}"
209209
fi
210210

211+
debug "Current version: ${latest_tag}"
211212
debug "Next version: ${next_tag}"
212213

213214
info "Creating new release branch"

scripts/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function should_abort_release() {
6060
return 0
6161
fi
6262

63-
latest_tag=$(git_run "${foundation_sdk_path}" describe --tags --abbrev=0 2>/dev/null || echo 'v0.0.0')
63+
latest_tag=$(git_run "${foundation_sdk_path}" describe --tags --exclude 'go/*' --abbrev=0 2>/dev/null || echo 'v0.0.0')
6464
current_marker=$(cat "${release_marker}")
6565

6666
# The release marker and latest tags are equal: we just merged the

0 commit comments

Comments
 (0)