Skip to content

Commit

Permalink
Validate single branch for tag
Browse files Browse the repository at this point in the history
Handles case where tagged commit exists on multiple branches - such as when we branch for a new release and then immediately tag an RC.

Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Dec 23, 2024
1 parent 4ea4b4b commit 9255fd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/validate-release
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function get-module-version() {
}

function check_release_branch() {
TAG_BRANCH=$(git branch --all -q --contains $GIT_TAG | grep origin | grep -vE 'dependabot|updatecli|origin$|HEAD' | sed -e 's/^[[:space:]]*//')
TAG_BRANCH=$(git branch --all -q --contains $GIT_TAG | grep origin | grep -vE 'dependabot|updatecli|origin$|HEAD' | sed -e 's/^[[:space:]]*//' | tail -1)
if [ "$TAG_BRANCH" == "remotes/origin/master" ]; then
K8S_VERSION_GO_MOD=$(get-module-version k8s.io/kubernetes | cut -d. -f1-2)
if [ "v$MAJOR.$MINOR" == "$K8S_VERSION_GO_MOD" ]; then
Expand Down

0 comments on commit 9255fd8

Please sign in to comment.