diff --git a/tools/export-github.sh b/tools/export-github.sh index cbcb788f..907408e8 100755 --- a/tools/export-github.sh +++ b/tools/export-github.sh @@ -244,10 +244,19 @@ fi git log --oneline -3 # --- 5. bundle for transfer (full bundle: stateless, fetch takes only new) --- -# Carries the branch that was published, not a hardcoded main. -git bundle create "$OUT/shopdb-flask-pub.bundle" HEAD "$BRANCH" --tags -git bundle verify "$OUT/shopdb-flask-pub.bundle" >/dev/null -echo "bundle: $OUT/shopdb-flask-pub.bundle" +# +# ONE BUNDLE PER BRANCH, named after it. +# +# This wrote a single shopdb-flask-pub.bundle whatever it published, which was +# fine while only main was ever published and became a trap the moment it was +# not: exporting a site branch silently overwrote the bundle holding main's +# work, and the work PC's documented `git fetch main` then failed +# because that ref was no longer in the file. Two branches cannot share one +# filename. +BUNDLE="$OUT/shopdb-flask-pub-$BRANCH.bundle" +git bundle create "$BUNDLE" HEAD "$BRANCH" --tags +git bundle verify "$BUNDLE" >/dev/null +echo "bundle: $BUNDLE" # --- 6. optional per-instance dists (both bases: /ops = dev, /shopdb = prod) --- # Two instances run on the box; each needs its own base-path build. Always @@ -266,7 +275,7 @@ cat <\shopdb-flask-pub.bundle $BRANCH + git fetch \shopdb-flask-pub-$BRANCH.bundle $BRANCH git merge --ff-only FETCH_HEAD git push origin $BRANCH EOF