Commit 82edc074 authored by Jürgen Haas's avatar Jürgen Haas
Browse files

bitegra/portal/drupal/projects/portal-default#8 Improve update-env script to...

bitegra/portal/drupal/projects/portal-default#8 Improve update-env script to better work in gitlab ci context
parent 8a45321b
Pipeline #82328 passed with stage
in 46 seconds
......@@ -3,7 +3,11 @@
URL=$(git config --get remote.origin.url)
FILE=$(basename $URL)
PROJECT_NAME=$(echo "$FILE" | sed -r 's/\.git//g')
PROJECT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$CI_COMMIT_REF_NAME" = "" ]]; then
PROJECT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
else
PROJECT_BRANCH=$CI_COMMIT_REF_NAME
fi
PROJECT_BRANCH_SANITIZED=$(echo "$PROJECT_BRANCH" | sed -r 's/[\/_]+/-/g')
echo "PROJECT_NAME=${PROJECT_NAME}" >>.env
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment