Repository navigation
feat(cli): add Homebrew formula - #171
Merged
Merged
Conversation
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.
Closes #61
Summary
Formula/crypt-fyi.rb: a Homebrew formula for the CLI, kept in this repo so no separate tap repo is needed. It follows the standard Homebrew pattern for Node packages (depends_on "node",npm install *std_npm_args, symlinkslibexec/bin/*) and installs the published npm tarball for@crypt.fyi/cli@0.2.0, pinned by sha256. Thetest doblock checkscfyi --versionagainst the formula version, checks that--helplists theencryptcommand, and runs an argument-validation error path with no network access.crypt-fyibecause Homebrew tap names can't contain dots. The URL argument points at this repo.release.yml/ newhomebrewjob: runs after a release that published@crypt.fyi/cli, and also on manualworkflow_dispatchruns to re-sync. It downloads the new tarball from registry.npmjs.org, with retries in case the registry lags a fresh publish. It checks the download against npm'sdist.integrity, rewritesurlandsha256in the formula, and commitschore(cli): bump Homebrew formula to X.Y.Zstraight tomain. Themainruleset only blocks deletion and non-fast-forward pushes, and pushes made withGITHUB_TOKENdon't trigger more workflow runs. It uses onlyactions/checkout@v7(same pin as the other jobs) plus shell; no third-party actions.packages/cli/README.md; root README feature list and "Releasing packages" notes.Testing
dist.integrity. The sha256 in the formula comes from that file.std_npm_args) and ran eachtest docommand by hand.--versionprinted0.2.0,--helplistedencrypt, and the content+file combination exited 1 with the expected message.sedsubstitution against the formula locally.release.ymlparses as YAML and passes Prettier, andpnpm format:checkandchangeset status --since=origin/mainboth pass.brew install,brew testandbrew audit, andruby -c. I wrote this on Windows without Homebrew or Ruby, so it is worth running these on macOS or Linux before merging:homebrewworkflow job only runs on the next CLI release, so it is untested end to end.