From db411d73a5fd015d4f16424e2963bc228a8a0e9a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 27 Apr 2024 01:43:14 +0200 Subject: [PATCH] projects_group --- cd.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cd.sh b/cd.sh index a976282..4051d08 100644 --- a/cd.sh +++ b/cd.sh @@ -39,6 +39,17 @@ else echo 'CD_PROJECT_NAME' exit 3 fi +# projects / group +[ "${CI_PROJECT_PATH}" ] \ +&& CD_PROJECTS_GROUP="$(dirname "${CI_PROJECT_PATH}")" +[ "${GITHUB_REPOSITORY}" ] \ +&& CD_PROJECTS_GROUP="$(dirname "${GITHUB_REPOSITORY}")" +if [ "${CD_PROJECTS_GROUP}" ] ; then + echo "CD_PROJECTS_GROUP = ${CD_PROJECTS_GROUP}" +else + echo 'CD_PROJECTS_GROUP' + exit 3 +fi # [ "${CI_SERVER_URL}" ] && CD_REPOSITORIES_URL="${CI_SERVER_URL}" [ "${GITHUB_SERVER_URL}" ] && CD_REPOSITORIES_URL="${GITHUB_SERVER_URL}"