Skip to content

tools: repo-publish --from-main publishes a tree with no prebuilt files (from #289) - #476

Merged
derekross merged 3 commits into
mainfrom
repo-publish-289
Nov 7, 2026
Merged

derekross merged 3 commits into
mainfrom
repo-publish-289

Conversation

@derekross

Copy link
Copy Markdown
Owner

only21mil's #289, approved on 11-02, merged onto main with three conflicts resolved:

tests/repo-publish passes (4 ok).

🤖 Generated with Claude Code

only21mil and others added 3 commits November 1, 2026 22:28
--from-main copies the gitignored prebuilt binaries into
out/publish-tree with git ls-files | grep -z /prebuilt/ | rsync. In a
checkout that has none (a fresh clone, or one where nothing has been
built), grep finds no match and exits 1; under set -euo pipefail that
ends the script with no message before it hands over to the clean
tree, so nothing is built or published.

git now selects the files itself with the pathspec
':(glob)packages/**/prebuilt/**', which picks the same names the grep
did and exits 0 when there are none; rsync then gets an empty list and
copies nothing. A failing git ls-files or rsync still stops the script
before the publisher runs.

tests/repo-publish runs the block in a fixture repository: the real git
lists the inventory and the real rsync copies it, a stand-in git
answers fetch, checkout and clean, and a stand-in publisher in the
fixture's out/publish-tree records its arguments. It covers no ignored
files, ignored files with none under prebuilt/, prebuilt names with a
space and a newline at two depths, a git ls-files that fails at once
(a corrupt index) or after some names, and a failing rsync. CI's Arch
container gets rsync so the test runs there.

Tested on the laptop (no phone; the script never runs on one):
tests/repo-publish passes on this commit and fails at its first case on
the parent; mutants that swallow the git or rsync status each fail it;
the pathspec and the old grep select the same files from a tree of
awkward names. tools/pr-check and tests/all pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolves three conflicts. checks.yml keeps main's package line, which
already has rsync. In repo-publish, #289's pathspec replaces the
grep -z that fails under pipefail on an empty list, extended to the
boot-files/ directories main copies since. In tests/all, tests/repo-publish
is appended to main's list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The check greps tools/repo-publish's source for the old grep -zE filter,
which #289's pathspec replaces. On a checkout with cheetah's boot files
staged, the old filter and the new pathspec list the same files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derekross
derekross merged commit a1b328f into main Nov 7, 2026
2 checks passed
@derekross
derekross deleted the repo-publish-289 branch November 7, 2026 13:59
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…es (derekross#289) (derekross#476)

repo-publish --from-main copies the gitignored prebuilt binaries and boot files into its clean origin/main checkout. It listed them with git ls-files piped through grep -z, and grep exits 1 on an empty list, so under pipefail a checkout with none stopped the publish. A git pathspec now picks them (packages/**/prebuilt/** and packages/**/boot-files/**), and an empty list copies nothing. tests/repo-publish covers the empty inventory, NUL-separated names, and an inventory or copy that fails partway, each stopping before anything is published. On a checkout with cheetah's boot files staged, the old filter and the new pathspec list the same files.

Co-Authored-By: Victor Vogel <satsdev@only21mil.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants