diff --git a/scripts/publish-github.sh b/scripts/publish-github.sh index 2cad09d..5e81a51 100755 --- a/scripts/publish-github.sh +++ b/scripts/publish-github.sh @@ -38,6 +38,11 @@ work="$(mktemp -d)" trap 'rm -rf "${work}"' EXIT 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 update-ref -d "${ref}" +done quoted="" for p in "${internal[@]}"; do