parent
db411d73a5
commit
4e4439fcb2
1 changed files with 9 additions and 9 deletions
18
cd.sh
18
cd.sh
|
@ -27,6 +27,15 @@ case "${CD_OS_NAME}" in
|
|||
exit 1
|
||||
;;
|
||||
esac
|
||||
# project / branch
|
||||
[ "${CI_COMMIT_BRANCH}" ] && CD_PROJECT_BRANCH="${CI_COMMIT_BRANCH}"
|
||||
[ "${GITHUB_REF_NAME}" ] && CD_PROJECT_BRANCH="${GITHUB_REF_NAME}"
|
||||
if [ "${CD_PROJECT_BRANCH}" ] ; then
|
||||
echo "CD_PROJECT_BRANCH = ${CD_PROJECT_BRANCH}"
|
||||
else
|
||||
echo 'CD_PROJECT_BRANCH'
|
||||
exit 3
|
||||
fi
|
||||
# project / name
|
||||
[ "${CI_PROJECT_PATH}" ] \
|
||||
&& CD_PROJECT_NAME="$(basename "${CI_PROJECT_PATH}")"
|
||||
|
@ -60,15 +69,6 @@ else
|
|||
echo 'CD_REPOSITORIES_URL'
|
||||
exit 3
|
||||
fi
|
||||
#
|
||||
[ "${CI_COMMIT_BRANCH}" ] && CD_PROJECT_BRANCH="${CI_COMMIT_BRANCH}"
|
||||
[ "${GITHUB_REF_NAME}" ] && CD_PROJECT_BRANCH="${GITHUB_REF_NAME}"
|
||||
if [ "${CD_PROJECT_BRANCH}" ] ; then
|
||||
echo "CD_PROJECT_BRANCH = ${CD_PROJECT_BRANCH}"
|
||||
else
|
||||
echo 'CD_PROJECT_BRANCH'
|
||||
exit 3
|
||||
fi
|
||||
|
||||
function cd_step {
|
||||
if [ "${1}" ] ; then
|
||||
|
|
Loading…
Reference in a new issue