Only push on 'main' branch

This commit is contained in:
Christian Mäder 2019-10-14 23:10:42 +02:00
parent 123fd981e9
commit 42642c94c3
1 changed files with 10 additions and 1 deletions

View File

@ -2,4 +2,13 @@
. hooks/common
if [ "${SOURCE_BRANCH}" == "main" ] || [ "${DEBUG}" == "true" ]; then
if [ "${SOURCE_BRANCH}" != "main" ]; then
echo "⚠️⚠️⚠️ Would exit, but DEBUG is '${DEBUG}'".
fi
run_build --push-only
else
echo "⚠️⚠️⚠️ Only pushing on 'main' branch, but current branch is '${SOURCE_BRANCH}'"
exit 0
fi