homebrew-tap
Clone
Read only, no credentials:
https://rodent.software/homebrew-tap.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/homebrew-tap.git
Homebrew tap for Rodent Software.
Make the tap shared across Rodent Software projects
8b2c3ebfcc703c9090254b3a624fbdd15e471794 · keenan · 7d ago · parent 60730641
Make the tap shared across Rodent Software projects The tap is not Vole-specific: it ships one formula per project. Generalize autobump.sh to take a project name and derive the formula, asset names, and base URL from it, and rewrite the README as the Rodent Software tap with a project table and an adding-a-project section.
README.md +48−28
| @@ -1,16 +1,19 @@ | |||
| 1 | # Vole Homebrew tap | ||
| 1 | # Rodent Software Homebrew tap | ||
| 2 | 2 | ||
| 3 | A [Homebrew](https://brew.sh) tap for | ||
| 4 | [Vole](https://rodent.software/vole), the forge that lives in your Git | ||
| 5 | repository. It installs the standalone macOS binary the release already builds; | ||
| 6 | there are no other files to install, so the formula is a single static | ||
| 7 | executable plus a `service` block. | ||
| 3 | A [Homebrew](https://brew.sh) tap for Rodent Software projects. Each project | ||
| 4 | ships one formula here, so a single tap installs and upgrades every Rodent | ||
| 5 | Software tool. | ||
| 6 | |||
| 7 | | Project | Formula | Description | | ||
| 8 | |---|---|---| | ||
| 9 | | [Vole](https://rodent.software/vole) | `vole` | A forge that lives in your Git repository | | ||
| 8 | 10 | ||
| 9 | 11 | ## Install | |
| 10 | 12 | ||
| 11 | Vole hosts this tap on its own forge, not GitHub, so Homebrew has to be told the | ||
| 12 | clone URL rather than guessing GitHub. The `rodent-software/vole` name is just the | ||
| 13 | label the tap installs under; the URL is where it is actually cloned from: | ||
| 13 | The tap is hosted on the Rodent Software forge, not GitHub, so Homebrew has to | ||
| 14 | be told the clone URL rather than guessing GitHub. The `rodent-software/vole` | ||
| 15 | name is just the label the tap installs under; the URL is where it is actually | ||
| 16 | cloned from: | ||
| 14 | 17 | ||
| 15 | 18 | ```sh | |
| 16 | 19 | brew tap rodent-software/vole https://rodent.software/homebrew-tap.git | |
| @@ -18,46 +21,63 @@ brew install vole | |||
| 18 | 21 | brew services start vole | |
| 19 | 22 | ``` | |
| 20 | 23 | ||
| 24 | After tapping once, install any other project with `brew install <project>` | ||
| 25 | (`rack` when it ships a formula, for example). Each formula installs the | ||
| 26 | standalone macOS binary its project's release already builds, pinned against | ||
| 27 | that release's `SHA256SUMS`. | ||
| 28 | |||
| 21 | 29 | Serving the tap from your own instance? Replace the URL with that instance's | |
| 22 | public clone URL (`https://<host>/homebrew-tap.git`). The formula installs `vole` | ||
| 23 | from the release's own `vole-darwin-arm64` (Apple Silicon) or `vole-darwin-amd64` | ||
| 24 | (Intel) artifact, pinned against that release's `SHA256SUMS`. | ||
| 30 | public clone URL (`https://<host>/homebrew-tap.git`). | ||
| 31 | |||
| 32 | `brew upgrade <project>` replaces the binary when the tap is bumped. | ||
| 25 | 33 | ||
| 26 | `brew upgrade vole` replaces the binary when the tap is bumped. | ||
| 34 | ## Project notes | ||
| 27 | 35 | ||
| 28 | ## What the service does | ||
| 36 | ### Vole | ||
| 29 | 37 | ||
| 38 | The `vole` binary is the server, the CLI, and the CI runner in one, so | ||
| 30 | 39 | `brew services start vole` runs `vole serve` as a LaunchAgent. A LaunchAgent | |
| 31 | 40 | cannot bind a privileged port, so the forge listens on the default unprivileged | |
| 32 | 41 | SSH (`127.0.0.1:2222`) and HTTP (`127.0.0.1:8080`) addresses. Put the | |
| 33 | 42 | [system sshd in front of Vole](https://rodent.software/vole/deploy/#put-sshd-in-front-of-vole) | |
| 34 | 43 | for a portless clone URL, or use | |
| 35 | 44 | [socket activation](https://rodent.software/vole/deploy/) for HTTPS on 443. | |
| 36 | A LaunchAgent also stops when the user logs out; a machine-wide LaunchDaemon is a | ||
| 45 | A LaunchAgent stops when the user logs out; a machine-wide LaunchDaemon is a | ||
| 37 | 46 | separate install described in the deployment docs. | |
| 38 | 47 | ||
| 39 | 48 | ## Bumping a release | |
| 40 | 49 | ||
| 41 | `Formula/vole.rb` pins one release at a time: its `version` and the two `sha256` | ||
| 42 | values must agree with that release's `SHA256SUMS`. To move the tap to a new | ||
| 43 | release: | ||
| 50 | Each `Formula/<project>.rb` pins one release at a time: its `version` and the two | ||
| 51 | `sha256` values must agree with that release's `SHA256SUMS`. To move a project to | ||
| 52 | a new release: | ||
| 44 | 53 | ||
| 45 | 54 | ```sh | |
| 46 | scripts/autobump.sh # the newest release | ||
| 47 | scripts/autobump.sh v0.2.0 # a specific tag | ||
| 48 | git diff # review the version and checksums | ||
| 55 | scripts/autobump.sh vole # the newest release | ||
| 56 | scripts/autobump.sh vole v0.2.0 # a specific tag | ||
| 57 | git diff # review the version and checksums | ||
| 49 | 58 | git commit -am "Bump vole to v0.2.0" && git push | |
| 50 | 59 | ``` | |
| 51 | 60 | ||
| 52 | `autobump.sh` reads the release's `SHA256SUMS`, downloads each darwin asset, and | ||
| 53 | refuses to write a checksum that does not match what it downloaded. A release | ||
| 54 | whose `SHA256SUMS` disagrees with its artifacts fails the bump, so it can never | ||
| 55 | fail an install. The script only edits the formula; committing and pushing are | ||
| 56 | yours, so a bot never writes to the tap on its own. | ||
| 61 | `autobump.sh` takes the project name, reads that release's `SHA256SUMS`, | ||
| 62 | downloads each darwin asset, and refuses to write a checksum that does not match | ||
| 63 | what it downloaded. A release whose `SHA256SUMS` disagrees with its artifacts | ||
| 64 | fails the bump, so it can never fail an install. The script only edits the | ||
| 65 | formula; committing and pushing are yours, so a bot never writes to the tap on | ||
| 66 | its own. | ||
| 67 | |||
| 68 | ## Adding a project | ||
| 69 | |||
| 70 | - Drop its formula at `Formula/<project>.rb`. | ||
| 71 | - Make sure its release publishes `<project>-darwin-arm64` and | ||
| 72 | `<project>-darwin-amd64` artifacts plus a `SHA256SUMS` under | ||
| 73 | `releases/<tag>/artifacts/`, and that its homepage is | ||
| 74 | `https://rodent.software/<project>`. | ||
| 75 | - Add a row to the table above. `scripts/autobump.sh <project>` then keeps it | ||
| 76 | current. | ||
| 57 | 77 | ||
| 58 | 78 | ## Repository layout | |
| 59 | 79 | ||
| 60 | 80 | ```text | |
| 61 | Formula/vole.rb the formula | ||
| 62 | scripts/autobump.sh refresh version and checksums from SHA256SUMS | ||
| 81 | Formula/<project>.rb one formula per project | ||
| 82 | scripts/autobump.sh refresh version and checksums from SHA256SUMS | ||
| 63 | 83 | ``` | |