hugo: Always hard-reset to origin after fetching

This commit is contained in:
Alex Palaistras 2022-10-29 17:38:39 +01:00
parent eda658f99d
commit ddc2f50505

View File

@ -22,7 +22,7 @@ export GIT_SSH_COMMAND
if test -d "$GIT_DIR_NAME"; then if test -d "$GIT_DIR_NAME"; then
cd "$GIT_DIR_NAME" cd "$GIT_DIR_NAME"
git fetch origin "$GIT_BRANCH" && git reset --hard "$GIT_BRANCH" git fetch origin "$GIT_BRANCH" && git reset --hard origin
else else
git clone --depth 1 --branch "$GIT_BRANCH" -- "$GIT_REPO_URL" "$GIT_DIR_NAME" git clone --depth 1 --branch "$GIT_BRANCH" -- "$GIT_REPO_URL" "$GIT_DIR_NAME"
cd "$GIT_DIR_NAME" cd "$GIT_DIR_NAME"