Skip to content

Commit

Permalink
Fix bugfix-release.sh behavior when there is nothing to release
Browse files Browse the repository at this point in the history
```
./tekton/bugfix-release.sh: line 17: return: can only `return' from a function or sourced script
```

It should be `exit` instead :)

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
  • Loading branch information
vdemeester committed Apr 8, 2024
1 parent 5076da2 commit bcdbc02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tekton/bugfix-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ git fetch -p --all
TEKTON_RELEASE_GIT_SHA=$(git rev-parse "${RELEASE_BRANCH}")
TEKTON_OLD_VERSION=$(git describe --tags --abbrev=0 "${TEKTON_RELEASE_GIT_SHA}")
TEKTON_OLD_VERSION_COMMIT_SHA=$(git rev-list -n 1 "${TEKTON_OLD_VERSION}")
TEKTON_RELEASE_NAME=$(gh release view v0.47.7 --json name | jq .name | sed -e 's/.*\\"\(.*\)\\"\"/\1/')
TEKTON_RELEASE_NAME=$(gh release view "${TEKTON_OLD_VERSION}" --json name | jq .name | sed -e 's/.*\\"\(.*\)\\"\"/\1/')

if [[ "${TEKTON_RELEASE_GIT_SHA}" == "${TEKTON_OLD_VERSION_COMMIT_SHA}" ]]; then
echo "> No new commit in ${RELEASE_BRANCH} (${TEKTON_RELEASE_GIT_SHA}==${TEKTON_OLD_VERSION_COMMIT_SHA})"
return 0
exit 0
fi

TEKTON_VERSION=$(echo ${TEKTON_OLD_VERSION} | awk -F. -v OFS=. '{$NF += 1 ; print}')
Expand Down

0 comments on commit bcdbc02

Please sign in to comment.