feat: Add Homebrew channel and install-aware updates#196
Open
gjtorikian wants to merge 3 commits into
Open
Conversation
The update notice always pointed at the generic GitHub download link, so the suggested action rarely matched how the CLI was actually installed. It now infers the channel from the running binary's path and prints the matching command — brew upgrade, npm install -g, or the download link. Homebrew joins npm as a supported channel: each stable release regenerates the tap formula from the same published binaries and pushes it to workos/homebrew-tap, keeping brew in lockstep with releases instead of the hand-maintained, now-stale formula.
Greptile SummaryThis PR adds Homebrew distribution and install-aware update notices. The main changes are:
Confidence Score: 5/5The latest fix looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "ci: Push the Homebrew formula via the SD..." | Re-trigger Greptile |
The npm launcher's binary sits at …\node_modules\@workos\cli-win32-x64 \bin\workos.exe on Windows, whose backslashes never matched the /node_modules/ marker — so Windows npm users were told to re-download from GitHub Releases instead of running npm install -g. Normalize separators before matching.
The SDK Automation Bot is already installed on workos/homebrew-tap with contents write, so mint a tap-scoped installation token from it instead of provisioning a dedicated PAT — one fewer secret to manage, and it matches how the SDK repos already publish.
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
detectInstallMethod()infers homebrew / npm / downloaded-binary from the running binary'sprocess.execPathand prints the matching upgrade command (brew upgrade workos,npm install -g workos@latest, or the GitHub download link) instead of the one-size-fits-all link that rarely matched how the CLI was actually installed.publish-homebrewjob regenerates the tap formula from the same published binaries and pushes it toworkos/homebrew-tapon every stable release, sobrew install workos/tap/workosandbrew upgrade workostrack releases instead of the hand-maintained, now-stale formula.scripts/gen-homebrew-formula.tscomputes each platform's sha256 from the release artifacts, rejects prereleases, and emits an audit-cleandesc. Stable-only is enforced twice: the job is gatedif: !contains(tag, '-')and the generator throws on prerelease versions.install-method.spec.tscovers detection and upgrade strings across mac/Linuxbrew/npm/download paths;version-check.spec.tspins the notice via a mock so the assertion no longer depends on the test runner's own execPath.