parent
afffb8c90f
commit
7891ddfefa
1 changed files with 5 additions and 1 deletions
6
cd.sh
6
cd.sh
|
@ -32,6 +32,7 @@ esac
|
||||||
[ "${GITHUB_SERVER_URL}" ] && CD_REPOSITORIES_URL="${GITHUB_SERVER_URL}"
|
[ "${GITHUB_SERVER_URL}" ] && CD_REPOSITORIES_URL="${GITHUB_SERVER_URL}"
|
||||||
if [ "${CD_REPOSITORIES_URL}" ] ; then
|
if [ "${CD_REPOSITORIES_URL}" ] ; then
|
||||||
CD_REPOSITORIES_URL+="/${CD_REPOSITORIES_GROUP}"
|
CD_REPOSITORIES_URL+="/${CD_REPOSITORIES_GROUP}"
|
||||||
|
echo "CD_REPOSITORIES_URL = ${CD_REPOSITORIES_URL}"
|
||||||
else
|
else
|
||||||
echo 'CD_REPOSITORIES_URL'
|
echo 'CD_REPOSITORIES_URL'
|
||||||
exit 3
|
exit 3
|
||||||
|
@ -41,6 +42,7 @@ fi
|
||||||
[ "${GITHUB_REPOSITORY}" ] \
|
[ "${GITHUB_REPOSITORY}" ] \
|
||||||
&& CD_PROJECT_NAME="$(basename "${GITHUB_REPOSITORY}")"
|
&& CD_PROJECT_NAME="$(basename "${GITHUB_REPOSITORY}")"
|
||||||
if [ "${CD_PROJECT_NAME}" ] ; then
|
if [ "${CD_PROJECT_NAME}" ] ; then
|
||||||
|
echo "CD_PROJECT_NAME = ${CD_PROJECT_NAME}"
|
||||||
CD_PROJECT_URL="${CD_REPOSITORIES_URL}/${CD_PROJECT_NAME}"
|
CD_PROJECT_URL="${CD_REPOSITORIES_URL}/${CD_PROJECT_NAME}"
|
||||||
else
|
else
|
||||||
echo 'CD_PROJECT_NAME'
|
echo 'CD_PROJECT_NAME'
|
||||||
|
@ -49,7 +51,9 @@ fi
|
||||||
#
|
#
|
||||||
[ "${CI_COMMIT_BRANCH}" ] && CD_PROJECT_BRANCH="${CI_COMMIT_BRANCH}"
|
[ "${CI_COMMIT_BRANCH}" ] && CD_PROJECT_BRANCH="${CI_COMMIT_BRANCH}"
|
||||||
[ "${GITHUB_REF_NAME}" ] && CD_PROJECT_BRANCH="${GITHUB_REF_NAME}"
|
[ "${GITHUB_REF_NAME}" ] && CD_PROJECT_BRANCH="${GITHUB_REF_NAME}"
|
||||||
if [ ! "${CD_PROJECT_BRANCH}" ] ; then
|
if [ "${CD_PROJECT_BRANCH}" ] ; then
|
||||||
|
echo "CD_PROJECT_BRANCH = ${CD_PROJECT_BRANCH}"
|
||||||
|
else
|
||||||
echo 'CD_PROJECT_BRANCH'
|
echo 'CD_PROJECT_BRANCH'
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue