From 9a9f5b92d7cde2a969cee4eb8fd83b0c600b85d6 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 20 Jul 2024 17:16:36 +0200 Subject: [PATCH] check project branch --- spcd.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spcd.sh b/spcd.sh index 4ac221e..b8d7ed1 100644 --- a/spcd.sh +++ b/spcd.sh @@ -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"