▍ humdrum codex / ticktock v0.0.2
license AGPL-3.0

chore(release): add .custard.yaml, drop hand-rolled brew scaffolding

ed44c45f18f0f9af1e9fc106b03f0716f37e0f2a
Kevin Kortum <kevinkortum@me.com> · 2026-07-08 08:00

parent 1f82ec78

chore(release): add .custard.yaml, drop hand-rolled brew scaffolding

Release through custard to the self-hosted Homebrew tap instead of the
hand-rolled script. .custard.yaml declares the CI checks (go vet, go
test), the go build package (./cmd/ticktock), and jj-native bookmark
release source (release/vX.Y.Z). Remove scripts/brew-release.sh and
deploy/deploy.env.example (superseded), and repoint the README release
section at the bookmark-push flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pc56rzYZo9TjJgXN951Psk

5 files changed

.custard.yaml +10 −0
@@ -0,0 +1,10 @@
+# custard release config — tt is a Go CLI distributed via the self-hosted Homebrew tap.
+ci:
+  - go vet ./...
+  - go test ./...
+brew:
+  enabled: true
+  package: ./cmd/ticktock   # main lives under cmd/ticktock; binary is `tt`
+  source: bookmark          # jj-native: release ref = release/vX.Y.Z bookmark (jj git push -b),
+                            # not a git tag — bookmarks push natively over jj.
+  bookmark_prefix: "release/"
.gitignore +0 −1
@@ -1,2 +1 @@
 bin/
-/deploy/deploy.env
README.md +10 −3
@@ -65,9 +65,16 @@     make vet
 
 ## Release
 
-Homebrew release scaffolding lives in `scripts/brew-release.sh` and
-`deploy/deploy.env.example` (copy to `deploy/deploy.env`, gitignored). The
-formula is a source build (`depends_on "go"`); publishing is a manual step.
+Releases ship through [custard](https://codex.humdrum.me/r/custard) to the
+self-hosted Homebrew tap. Config lives in `.custard.yaml` (source build,
+`depends_on "go"`). To cut a release, push a `release/vX.Y.Z` bookmark:
+
+    jj bookmark create release/v0.1.0 -r @-
+    jj git push --bookmark release/v0.1.0
+
+custard runs the CI checks, archives the ref, renders `Formula/tt.rb`, and
+commits it to the tap. Install requirements (tock, sqlite) live under
+[Requirements](#requirements) — the auto-formula does not repeat them.
 
 ## License
 
deploy/deploy.env.example +0 −5
@@ -1,5 +0,0 @@
-# Copy to deploy/deploy.env (gitignored) and fill in. Used by scripts/brew-release.sh.
-REMOTE=          # ssh host alias, e.g. codex
-DOMAIN=          # public domain serving /dl and /git, e.g. codex.humdrum.me
-REPOS_PATH=      # server path to the bare git repos, e.g. /var/lib/soft-serve/data/repos
-RUN_USER=        # OS user that owns the repos on the server
scripts/brew-release.sh +0 −92
@@ -1,92 +0,0 @@
-#!/usr/bin/env bash
-#
-# brew-release.sh [version]
-#
-# Release tt to the self-hosted Homebrew tap — no GitHub. Archives the tag
-# straight from the server's bare repo into a source tarball under /dl, then
-# writes/updates the source-build formula in the `homebrew-tap` repo and pushes.
-#
-#   scripts/brew-release.sh v0.1.0
-#
-# Prereqs: the tag exists in the `tt` repo on the server; deploy/deploy.env is
-# filled (REMOTE, DOMAIN, REPOS_PATH, RUN_USER); the `homebrew-tap` repo exists
-# on the server. Users then:
-#   brew tap humdrum/tap https://DOMAIN/git/homebrew-tap.git && brew install tt
-set -euo pipefail
-cd "$(dirname "$0")/.."
-
-REPO="tt"
-PKG="./cmd/ticktock"
-VERSION="${1:?usage: brew-release.sh <version>}"
-VER="${VERSION#v}" # strip leading v for tarball/version string
-
-[ -f deploy/deploy.env ] || { echo "missing deploy/deploy.env (see deploy/deploy.env.example)" >&2; exit 1; }
-set -a; . deploy/deploy.env; set +a
-: "${REMOTE:?}"; : "${DOMAIN:?}"; : "${REPOS_PATH:?}"; : "${RUN_USER:?}"
-
-TARBALL="${REPO}-${VER}.tar.gz"
-URL="https://${DOMAIN}/dl/${TARBALL}"
-HOMEPAGE="https://${DOMAIN}/r/${REPO}"
-CLASS="Tt"
-DESC="Charm-native front-end for the tock time tracker"
-
-echo "==> archiving ${REPO}@${VERSION} from the server"
-# Run as the repo owner so git doesn't reject "dubious ownership".
-ssh "$REMOTE" "sudo -u ${RUN_USER} git -C '${REPOS_PATH}/${REPO}.git' archive --format=tar.gz --prefix='${REPO}-${VER}/' '${VERSION}'" > "/tmp/${TARBALL}"
-SHA="$(shasum -a 256 "/tmp/${TARBALL}" | awk '{print $1}')"
-echo "    ${TARBALL}  sha256=${SHA}"
-
-echo "==> publishing tarball to /dl"
-ssh "$REMOTE" "install -d -o caddy -g caddy /var/lib/custard/dl"
-scp -q "/tmp/${TARBALL}" "$REMOTE:/var/lib/custard/dl/${TARBALL}"
-
-echo "==> updating the tap formula"
-TAP="$(mktemp -d)"
-git clone -q "soft:homebrew-tap" "$TAP"
-mkdir -p "$TAP/Formula"
-cat > "$TAP/Formula/${REPO}.rb" <<EOF
-# Generated by tt brew-release.sh — do not edit by hand.
-class ${CLASS} < Formula
-  desc "${DESC}"
-  homepage "${HOMEPAGE}"
-  url "${URL}"
-  sha256 "${SHA}"
-  license "AGPL-3.0-or-later"
-
-  depends_on "go" => :build
-
-  def install
-    system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "${PKG}"
-  end
-
-  def caveats
-    <<~EOS
-      tt drives the tock time tracker — install tock and put it on PATH:
-        https://github.com/dhth/tock
-      Tested against tock v1.9.8 (report --json / add -s/-e contract).
-
-      tock's sqlite backend is strongly recommended. On the file/markdown
-      backend, editing an entry (a remove-then-re-add) can silently drop
-      tags/notes because tock's report --json may omit them there.
-
-      For history autocomplete, install the sqlite3 CLI (optional):
-        brew install sqlite
-    EOS
-  end
-
-  test do
-    assert_path_exists bin/"${REPO}"
-    assert_match version.to_s, shell_output("#{bin}/${REPO} --version")
-  end
-end
-EOF
-git -C "$TAP" add "Formula/${REPO}.rb"
-git -C "$TAP" -c user.name="tt" -c user.email="tt@${DOMAIN}" \
-  commit -q -m "${REPO} ${VERSION}"
-git -C "$TAP" push -q origin HEAD
-rm -rf "$TAP"
-
-echo "==> done"
-echo "    brew tap humdrum/tap https://${DOMAIN}/git/homebrew-tap.git"
-echo "    brew trust humdrum/tap"
-echo "    brew install ${REPO}"