Skip to content

Commit 53fae15

Browse files
vdemeestertekton-robot
authored andcommitted
Fix bugfix-release.sh behavior when there is nothing to release
``` ./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 <[email protected]>
1 parent 1701d1b commit 53fae15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tekton/bugfix-release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ git fetch -p --all
1010
TEKTON_RELEASE_GIT_SHA=$(git rev-parse "${RELEASE_BRANCH}")
1111
TEKTON_OLD_VERSION=$(git describe --tags --abbrev=0 "${TEKTON_RELEASE_GIT_SHA}")
1212
TEKTON_OLD_VERSION_COMMIT_SHA=$(git rev-list -n 1 "${TEKTON_OLD_VERSION}")
13-
TEKTON_RELEASE_NAME=$(gh release view v0.47.7 --json name | jq .name | sed -e 's/.*\\"\(.*\)\\"\"/\1/')
13+
TEKTON_RELEASE_NAME=$(gh release view "${TEKTON_OLD_VERSION}" --json name | jq .name | sed -e 's/.*\\"\(.*\)\\"\"/\1/')
1414

1515
if [[ "${TEKTON_RELEASE_GIT_SHA}" == "${TEKTON_OLD_VERSION_COMMIT_SHA}" ]]; then
1616
echo "> No new commit in ${RELEASE_BRANCH} (${TEKTON_RELEASE_GIT_SHA}==${TEKTON_OLD_VERSION_COMMIT_SHA})"
17-
return 0
17+
exit 0
1818
fi
1919

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

0 commit comments

Comments
 (0)