Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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.

Add the Vole Homebrew formula and autobump script

ab3f4cbaeb37ac85d574dc3b53ee448a5b2f27e3 · keenan · 7d ago

Formula/vole.rb +57

@@ -0,0 +1,57 @@
1 # typed: false
2 # frozen_string_literal: true
3
4 # Vole — a forge that lives in your Git repository.
5 #
6 # One binary, one config file, no extra services. The same binary is the server
7 # (vole serve), the CLI, and the CI runner (vole runner), so this formula installs
8 # a single static executable and nothing else.
9 class Vole < Formula
10 desc "Forge that lives in your Git repository"
11 homepage "https://rodent.software/vole"
12 version "0.2.0"
13 license "Apache-2.0"
14
15 livecheck do
16 url :homepage
17 regex(%r{href=["']?[^"' >]*?/releases/v?(\d+(?:\.\d+)+)/}i)
18 end
19
20 depends_on "git"
21
22 # The macOS binaries are cross-compiled on Linux and attached to each release
23 # under releases/<tag>/artifacts/, covered by that release's SHA256SUMS. The
24 # checksums below are pinned against that list; the autobump script refreshes
25 # them (and the version) when a new release is published, and fails rather than
26 # ship a checksum that does not match the downloaded asset.
27 on_macos do
28 on_arm do
29 url "https://rodent.software/vole/releases/v#{version}/artifacts/vole-darwin-arm64"
30 sha256 "4d0a6211885bece9249a0dbe47b0c61121758cf70f447044a504cfb975d255df"
31 end
32 on_intel do
33 url "https://rodent.software/vole/releases/v#{version}/artifacts/vole-darwin-amd64"
34 sha256 "7bf370f0ac4c97c17c47a8198a22a7048a67ba8b4f6ed5fabaafad1edb66621d"
35 end
36 end
37
38 def install
39 arch = Hardware::CPU.arm? ? "arm64" : "amd64"
40 bin.install "vole-darwin-#{arch}" => "vole"
41 end
42
43 # brew services start vole runs the forge in the background. A LaunchAgent
44 # cannot bind a privileged port, so this serves on the default unprivileged SSH
45 # and HTTP listeners; see the deployment docs for a socket-activated daemon.
46 service do
47 run [opt_bin/"vole", "serve"]
48 log_path var/"log/vole.log"
49 error_log_path var/"log/vole.log"
50 keep_alive true
51 run_type :immediate
52 end
53
54 test do
55 assert_match version.to_s, shell_output("#{bin}/vole version")
56 end
57 end