if then syntax
Some checks failed
ci/woodpecker/push/main Pipeline failed

This commit is contained in:
Michael Balsillie 2022-08-21 23:09:55 +12:00
parent af46c34b8a
commit 57e958357a

View File

@ -22,14 +22,12 @@ pipeline:
image: code.balsillie.net/containers/debian:11-slim-bash image: code.balsillie.net/containers/debian:11-slim-bash
pull: false pull: false
commands: commands:
- if [[ $TAG =~ ^v1\...\..rc.$ ]] \ - if [[ $TAG =~ ^v1\...\..rc.$ ]]; then
then \ echo "Tag ${TAG} appears to be a release candidate, terminating build." && exit 1
echo "Tag ${TAG} appears to be a release candidate, terminating build." && exit 1 \ elif [[ $TAG =~ ^v1\...\..$ ]]; then
elif [[ $TAG =~ ^v1\...\..$ ]] \ echo "Tag ${TAG} appears to be a release tag, proceeding." && exit 0
then \ else
echo "Tag ${TAG} appears to be a release tag, proceeding." && exit 0 \ echo "Unable to determine nature of tag, terminating build." && exit 1
else \
echo "Unable to determine nature of tag, terminating build." && exit 1 \
fi fi
clone-source: clone-source:
image: docker:git image: docker:git