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.

Code

9 commit(s) on main

update readme Keenan Nemetz · 3d ago c55615f1
history blame raw 2.7 KiB
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.
9class Vole < Formula
10 desc "Forge that lives in your Git repository"
11 homepage "https://rodent.software/vole"
12 version "0.1.0-rc4"
13 license "Apache-2.0"
14
15 # Release links on the homepage look like <a href="/vole/releases/v0.1.0-rc4">
16 # — no trailing slash, and pre-releases carry a -rcN suffix. The version group
17 # has to admit both, or livecheck finds nothing (and, if it matched only the
18 # numeric part, it would offer 0.1.0 over the pinned 0.1.0-rc4 forever).
19 livecheck do
20 url :homepage
21 regex(%r{href=["']?[^"' >]*?/releases/v?(\d+(?:\.\d+)+(?:-[0-9a-z][0-9a-z.]*)?)["' >/]}i)
22 end
23
24 depends_on "git"
25
26 # The binaries are cross-compiled and attached to each release under
27 # releases/<tag>/artifacts/, covered by that release's SHA256SUMS. The checksums
28 # below are pinned against that list; the autobump script refreshes them (and
29 # the version) when a new release is published, and fails rather than ship a
30 # checksum that does not match the downloaded asset.
31 on_macos do
32 on_arm do
33 url "https://rodent.software/vole/releases/v#{version}/artifacts/vole-darwin-arm64"
34 sha256 "b4645b1e177f5cb0957c11aa3dc0b4de6f92cad6ff00390fc81d360ee8da3f5b"
35 end
36 on_intel do
37 url "https://rodent.software/vole/releases/v#{version}/artifacts/vole-darwin-amd64"
38 sha256 "4014b6b58dc01e6b85802b2551ab10ad61d73a85af52a7598930692c82d44f84"
39 end
40 end
41
42 on_linux do
43 on_arm do
44 url "https://rodent.software/vole/releases/v#{version}/artifacts/vole-linux-arm64"
45 sha256 "5c11bd2504d8170eff2de245991693f6cc2b6eddd51abd4dfa276f17b457c794"
46 end
47 on_intel do
48 url "https://rodent.software/vole/releases/v#{version}/artifacts/vole-linux-amd64"
49 sha256 "baa12605e69ddf5a279b83f6a067c11fcd0bc6d262215af931329f61ef6cbb20"
50 end
51 end
52
53 def install
54 os = OS.mac? ? "darwin" : "linux"
55 arch = Hardware::CPU.arm? ? "arm64" : "amd64"
56 bin.install "vole-#{os}-#{arch}" => "vole"
57 end
58
59 # brew services start vole runs the forge in the background. A LaunchAgent
60 # cannot bind a privileged port, so this serves on the default unprivileged SSH
61 # and HTTP listeners; see the deployment docs for a socket-activated daemon.
62 service do
63 run [opt_bin/"vole", "serve"]
64 log_path var/"log/vole.log"
65 error_log_path var/"log/vole.log"
66 keep_alive true
67 run_type :immediate
68 end
69
70 test do
71 assert_match version.to_s, shell_output("#{bin}/vole version")
72 end
73end
74