From 2f713b7fc5e29cfa7b0c92ba3270af2f16fbd93e Mon Sep 17 00:00:00 2001 From: Jonas Kruckenberg Date: Fri, 6 Jan 2023 17:21:48 +0100 Subject: [PATCH] don't force add --- .github/sync-to-mirrors.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/sync-to-mirrors.sh b/.github/sync-to-mirrors.sh index 757e1d10..ff5f3793 100755 --- a/.github/sync-to-mirrors.sh +++ b/.github/sync-to-mirrors.sh @@ -93,12 +93,13 @@ while read -r PLUGIN_NAME; do echo "Failed to find a branch to branch from, just creating an empty one." FORCE_COMMIT=--allow-empty fi - git add -Af + git rm -r --cached . + git add -A echo "::endgroup::" if [[ -n "$FORCE_COMMIT" || -n "$(git status --porcelain)" ]]; then echo "Committing to $PLUGIN_NAME" - if git commit --quiet $FORCE_COMMIT --author="${COMMIT_ORIGINAL_AUTHOR}" -m "${COMMIT_MESSAGE}" && + if git commit $FORCE_COMMIT --author="${COMMIT_ORIGINAL_AUTHOR}" -m "${COMMIT_MESSAGE}" && { [[ -z "$CI" ]] || git push origin "$BRANCH"; } # Only do the actual push from the GitHub Action then # echo "$BUILD_BASE/changes.diff"