parent
7891ddfefa
commit
839f6eea14
1 changed files with 10 additions and 10 deletions
20
cd.sh
20
cd.sh
|
@ -28,16 +28,6 @@ case "${CD_OS_NAME}" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
#
|
#
|
||||||
[ "${CI_SERVER_URL}" ] && CD_REPOSITORIES_URL="${CI_SERVER_URL}"
|
|
||||||
[ "${GITHUB_SERVER_URL}" ] && CD_REPOSITORIES_URL="${GITHUB_SERVER_URL}"
|
|
||||||
if [ "${CD_REPOSITORIES_URL}" ] ; then
|
|
||||||
CD_REPOSITORIES_URL+="/${CD_REPOSITORIES_GROUP}"
|
|
||||||
echo "CD_REPOSITORIES_URL = ${CD_REPOSITORIES_URL}"
|
|
||||||
else
|
|
||||||
echo 'CD_REPOSITORIES_URL'
|
|
||||||
exit 3
|
|
||||||
fi
|
|
||||||
#
|
|
||||||
[ "${CI_PROJECT_NAME}" ] && CD_PROJECT_NAME="${CI_PROJECT_NAME}"
|
[ "${CI_PROJECT_NAME}" ] && CD_PROJECT_NAME="${CI_PROJECT_NAME}"
|
||||||
[ "${GITHUB_REPOSITORY}" ] \
|
[ "${GITHUB_REPOSITORY}" ] \
|
||||||
&& CD_PROJECT_NAME="$(basename "${GITHUB_REPOSITORY}")"
|
&& CD_PROJECT_NAME="$(basename "${GITHUB_REPOSITORY}")"
|
||||||
|
@ -49,6 +39,16 @@ else
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
|
[ "${CI_SERVER_URL}" ] && CD_REPOSITORIES_URL="${CI_SERVER_URL}"
|
||||||
|
[ "${GITHUB_SERVER_URL}" ] && CD_REPOSITORIES_URL="${GITHUB_SERVER_URL}"
|
||||||
|
if [ "${CD_REPOSITORIES_URL}" ] ; then
|
||||||
|
CD_REPOSITORIES_URL+="/${CD_REPOSITORIES_GROUP}"
|
||||||
|
echo "CD_REPOSITORIES_URL = ${CD_REPOSITORIES_URL}"
|
||||||
|
else
|
||||||
|
echo 'CD_REPOSITORIES_URL'
|
||||||
|
exit 3
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in a new issue