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"