check project branch

This commit is contained in:
Marc Beninca 2024-07-20 17:16:36 +02:00
parent 108c007872
commit 9a9f5b92d7
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -127,8 +127,11 @@ spcd_set_environment_variables() {
else
spcd_error_ci "ø"
fi
# extra check
[ -n "${SPCD_PROJECT_BRANCH}" ] || spcd_error_ci "SPCD_PROJECT_BRANCH"
# check project variables
case "${SPCD_PROJECT_BRANCH}" in
"${SPCD_BRANCH_RELEASE}" | "${SPCD_BRANCH_STAGING}") ;;
*) spcd_error_ci "SPCD_PROJECT_BRANCH" ;;
esac
[ -n "${SPCD_PROJECT_ROOT}" ] || spcd_error_ci "SPCD_PROJECT_ROOT"
[ -n "${SPCD_PROJECT_PATH}" ] || spcd_error_ci "SPCD_PROJECT_PATH"
[ -n "${SPCD_PROJECT_NAME}" ] || spcd_error_ci "SPCD_PROJECT_NAME"