use script instead
Some checks failed
ci/woodpecker/push/main Pipeline failed

This commit is contained in:
Michael Balsillie 2022-08-21 23:19:54 +12:00
parent 57e958357a
commit add6f902dc
2 changed files with 13 additions and 8 deletions

View File

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

11
check-tag.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
if [[ $TAG =~ ^v1\...\..rc.$ ]]; then
echo "Tag ${TAG} appears to be a release candidate, terminating build."
exit 1
elif [[ $TAG =~ ^v1\...\..$ ]]; then
echo "Tag ${TAG} appears to be a release tag, proceeding."
exit 0
else
echo "Unable to determine nature of tag, terminating build."
exit 1
fi