Skip to content

Commit

Permalink
Don't set latest release when not publishing to GH
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil committed Mar 27, 2024
1 parent 424e75e commit 015d7b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions release.sh
Expand Up @@ -662,14 +662,14 @@ function set_latest_to_highest_semver() {
return 0
fi
echo "Setting latest release to highest semver"

local last_version release_id # don't combine with assignment else $? will be 0

last_version="$(hub_tool -p release | cut -d'-' -f2 | grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+$'| sort -r -V | head -1)"
if ! [[ $? -eq 0 ]]; then
abort "cannot list releases"
fi

release_id="$(hub_tool api "/repos/${ORG_NAME}/${REPO_NAME}/releases/tags/knative-${last_version}" | jq .id)"
if [[ $? -ne 0 ]]; then
abort "cannot get relase id from github"
Expand Down

0 comments on commit 015d7b5

Please sign in to comment.