Repository navigation
nsh: add the missing Homebrew formula - #15
Merged
Merged
Conversation
Keep release runtimes beside the CLI, guard supported architectures, and exercise Homebrew installation and web packaging on Apple silicon. Fixes longbridge/nsh#96. Implemented by ChatGPT on behalf of @huacnlee.
Keep a default URL so unsupported architectures reach their requirement error while conforming to Homebrew's formula component rules. Let the version be inferred from the release URL. Implemented by ChatGPT on behalf of @huacnlee.
huacnlee
marked this pull request as ready for review
October 19, 2026 07:39
huacnlee
added a commit
to longbridge/nsh
that referenced
this pull request
Oct 19, 2026
## Description Complete the existing release-to-Homebrew update path. The v0.1.1 [Packages run](https://github.com/longbridge/nsh/actions/runs/39103961583/job/117605768907) failed because its intended `HOMEBREW_TAP_TOKEN` was unavailable. The formula added in longbridge/homebrew-tap#15 now installs correctly, but the upstream template would overwrite its architecture guards and runtime smoke test on the next release. - Keep the generated formula identical to the fixed tap formula: official macOS ARM64/Linux x86_64 assets, explicit architecture requirements, complete `libexec` distribution, and CLI/web-runtime tests. - Validate published stable tags, exact checksum filenames and SHA-256 values; download and verify both archives. Install, audit and test the generated formula on Apple silicon before writing the tap. - Run read-only generation/Homebrew checks on package PRs and main pushes. Only published stable releases and explicit Packages dispatches can reach the tap writer. - Serialize writers, reject version downgrades, leave identical reruns without a commit, and retain non-force pushes. Add a clear missing-token failure and maintainer recovery instructions. - Limit future distribution builds to the Scoop template used by Release; Homebrew files now have their own focused checks. This PR still triggers distribution CI because it changes the release workflow's path filter. ## Required maintainer setup The existing `HOMEBREW_TAP_TOKEN` secret must be available to `longbridge/nsh`, with Contents read/write on `longbridge/homebrew-tap` and access allowed by its branch rules. This PR does not create, read, or modify credentials or permissions. The built-in workflow token remains read-only. After merge and credential setup, a new Packages dispatch on main can sync an existing published stable tag. No release or publishing workflow was dispatched for this PR. An authenticated cross-repository write remains unverified until that maintainer step. ## Validation - All 7 Python regression tests pass: tag/release rejection, exact asset checksums, missing sidecars, safe output on failure, runtime/architecture template content, idempotence and numerical downgrade prevention. - Generated v0.1.1 formula is byte-for-byte identical to the merged tap formula; both actual release archive SHA-256 checks and generated Ruby syntax pass. - YAML parsing and every inline Bash syntax check pass. Actionlint 1.7.12 passes apart from its unrecognized `concurrency.queue` key; `queue: max` is supported by [current GitHub documentation](https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency). The actual Packages workflow was accepted and passed by GitHub. - Independent review found no blocking defects. - [Apple-silicon Homebrew CI passed](https://github.com/longbridge/nsh/actions/runs/39218399342/job/117947623348) on head `9d9afcaccd97e372a6c6017a57714d8ea571450a`: generator tests, both archive checksums, style, strict audit, real installation and CLI/web-runtime tests. The tap writer correctly skipped this PR. - The three-platform [distribution build](https://github.com/longbridge/nsh/actions/runs/39218399271) remains in progress. Full Rust tests could not run locally because this executor has no Cargo; no Rust implementation changed. Implemented by ChatGPT on behalf of @huacnlee.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes longbridge/nsh#96.
nsh0.1.1 formula using the official macOS ARM64 and Linux x86_64 release archives and verified SHA-256 checksums.libexec, withbin/nshsymlinked so bundled runtimes remain discoverable. Unsupported architectures get an explicit requirement error.--version, app initialization, and web packaging through the installed command. Document supported platforms and add narrowly scoped, read-only Apple-silicon PR CI.Validation
brew style --formula longbridge/tap/nsh, andbrew audit --strict --formula longbridge/tap/nshpass.brew installis blocked by this container'ssocket(2)restriction; no local macOS executor was available.macos-15ARM64: formula style, strict audit, real Homebrew installation/checksum verification, CLI version, app initialization, and web-runtime packaging. Native GUI/SDK integration is outside this smoke test.Release publishing follow-up
This restores the missing formula for the existing release. The upstream Packages workflow failure still needs its intended
HOMEBREW_TAP_TOKENrestored by a maintainer. Before the next generated update, mirror the formula's guards/tests/style fixes in the upstream template, which otherwise overwrites this file. This PR does not change credentials or release workflows.Implemented by ChatGPT on behalf of @huacnlee.