publish-github.sh: do not stop silently when main is the only branch
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-20 09:12:11 +03:00
parent 33b3125556
commit ec8b794abe

View file

@ -40,7 +40,7 @@ git clone --quiet --bare --no-local "${root}" "${work}/repo.git"
cd "${work}/repo.git"
# Only main and the tags are published: other branches (work in progress) are dropped
# from this copy before filtering.
git for-each-ref --format='%(refname)' refs/heads | grep -vx 'refs/heads/main' | while read -r ref; do
git for-each-ref --format='%(refname)' refs/heads | { grep -vx 'refs/heads/main' || true; } | while read -r ref; do
git update-ref -d "${ref}"
done