diff --git a/cd.sh b/cd.sh index 97bae6b..a976282 100644 --- a/cd.sh +++ b/cd.sh @@ -27,8 +27,9 @@ case "${CD_OS_NAME}" in exit 1 ;; esac -# -[ "${CI_PROJECT_NAME}" ] && CD_PROJECT_NAME="${CI_PROJECT_NAME}" +# project / name +[ "${CI_PROJECT_PATH}" ] \ +&& CD_PROJECT_NAME="$(basename "${CI_PROJECT_PATH}")" [ "${GITHUB_REPOSITORY}" ] \ && CD_PROJECT_NAME="$(basename "${GITHUB_REPOSITORY}")" if [ "${CD_PROJECT_NAME}" ] ; then