nosqlbench/scripts/trigger-preview-build

22 lines
584 B
Plaintext
Raw Normal View History

2023-02-15 17:54:48 -06:00
#!/bin/bash
cd mvn-defaults
#set -x
CURRENT_VERSION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout)
RELEASE_VERSION=${CURRENT_VERSION%%-SNAPSHOT}
PREVIEW_TAG="${RELEASE_VERSION}-preview"
printf "preview tag: '%s'\n" "${PREVIEW_TAG}"
2023-02-15 17:58:09 -06:00
set -e
2023-02-15 17:54:48 -06:00
if [ "$1" == "-f" ]
then
2023-02-15 17:58:09 -06:00
git tag -f "${PREVIEW_TAG}" \
&& git push -f origin "${PREVIEW_TAG}" \
&& printf "force pushed tag %s to origin, triggering build.\n" "${PREVIEW_TAG}"
2023-02-15 17:54:48 -06:00
else
2023-02-15 17:58:09 -06:00
git tag "${PREVIEW_TAG}" \
&& git push origin "${PREVIEW_TAG}" \
&& printf "pushed tag %s to origin, triggering build.\n" "${PREVIEW_TAG}"
2023-02-15 17:54:48 -06:00
fi