mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
check for main branch on preview and release
This commit is contained in:
@@ -17,6 +17,16 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
export branch=$(git status --branch --porcelain | cut -d' ' -f2)
|
||||||
|
|
||||||
|
if [[ $branch =~ main ]]
|
||||||
|
then
|
||||||
|
printf "On branch main, continuing\n" 1>&2
|
||||||
|
else
|
||||||
|
printf "Not branch main, bailing out\n" 1>&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
export REVISION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout)
|
export REVISION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout)
|
||||||
if [[ $REVISION =~ ([0-9]+)\.([0-9]+)\.([0-9]+)-SNAPSHOT ]]
|
if [[ $REVISION =~ ([0-9]+)\.([0-9]+)\.([0-9]+)-SNAPSHOT ]]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -17,6 +17,17 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
export branch=$(git status --branch --porcelain | cut -d' ' -f2)
|
||||||
|
|
||||||
|
if [[ $branch =~ main ]]
|
||||||
|
then
|
||||||
|
printf "On branch main, continuing\n" 1>&2
|
||||||
|
else
|
||||||
|
printf "Not branch main, bailing out\n" 1>&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
export REVISION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout)
|
export REVISION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout)
|
||||||
if [[ $REVISION =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)-SNAPSHOT$ ]]
|
if [[ $REVISION =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)-SNAPSHOT$ ]]
|
||||||
then
|
then
|
||||||
|
|||||||
Reference in New Issue
Block a user