fix empty HUGO_GIT_BRANCH

This commit is contained in:
p4u1 2024-08-06 18:30:02 +02:00
parent 70568903b9
commit fb4a3fad43
2 changed files with 2 additions and 2 deletions

View File

@ -3,4 +3,4 @@ export BADGER_ENTRYPOINT_VERSION=v1
export DEFAULT_CONF_VERSION=v1
export SSH_CONF_VERSION=v1
export SSH_DEPLOY_KEY_VERSION=v1
export WEBHOOKD_SCRIPT_VERSION=v2
export WEBHOOKD_SCRIPT_VERSION=v3

View File

@ -23,7 +23,7 @@ echo "◆ Pull latest version from .git repository"
git fetch --all
git reset --hard origin/main
if [ ! -d "$HUGO_GIT_BRANCH" ]; then
if [ ! -z "$HUGO_GIT_BRANCH" ]; then
echo "Checkout $HUGO_GIT_BRANCH"
git reset --hard origin/$HUGO_GIT_BRANCH
git checkout origin/$HUGO_GIT_BRANCH