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}"