Skip to content
Snippets Groups Projects
Commit 905beecf authored by jurgenhaas's avatar jurgenhaas
Browse files

Bug fix for when no git remote is configured

parent 82edc074
No related branches found
No related tags found
No related merge requests found
Pipeline #144448 passed
#!/bin/bash
URL=$(git config --get remote.origin.url)
FILE=$(basename $URL)
PROJECT_NAME=$(echo "$FILE" | sed -r 's/\.git//g')
if [[ "$URL" = "" ]]; then
PROJECT_NAME=unknown
else
FILE=$(basename $URL)
PROJECT_NAME=$(echo "$FILE" | sed -r 's/\.git//g')
fi
if [[ "$CI_COMMIT_REF_NAME" = "" ]]; then
PROJECT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment