fix(ci): migrate .goreleaser.yaml off deprecated archives/brews APIs#292
Conversation
GoReleaser v2 deprecated archives.format, archives.format_overrides.format, archives.builds, and brews. Rename the archives fields to formats/ids and migrate the Homebrew formula to a macOS-only homebrew_casks block (binaries list replaces the install ruby block; the test stanza is dropped as casks have none). Linux users continue installing via the curl script. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Code Review
This pull request updates the .goreleaser.yaml configuration to align with GoReleaser v2 syntax, modifying archive formats and migrating the deprecated brews section. Feedback suggests using homebrews instead of homebrew_casks for distributing the CLI tool, as casks are intended for GUI applications. This change allows keeping the standard installation and test blocks.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| # Homebrew Casks are macOS-only; Linux users install via the curl script. | ||
| homebrew_casks: | ||
| - name: shelltime | ||
| ids: | ||
| - mt-common | ||
| - mac | ||
| binaries: | ||
| - shelltime | ||
| - shelltime-daemon | ||
| repository: | ||
| owner: shelltime | ||
| name: homebrew-tap | ||
| token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" | ||
| directory: Formula | ||
| directory: Casks | ||
| homepage: "https://shelltime.xyz" | ||
| description: "Track and analyze your shell usage - ShellTime CLI" | ||
| license: "MIT" | ||
| commit_author: | ||
| name: shelltime-bot | ||
| email: bot@shelltime.xyz | ||
| install: | | ||
| bin.install "shelltime" | ||
| bin.install "shelltime-daemon" | ||
| test: | | ||
| system "#{bin}/shelltime", "--version" | ||
| caveats: | | ||
| Get started with a single command: | ||
| shelltime init |
There was a problem hiding this comment.
In GoReleaser v2, the direct replacement for the deprecated brews section is homebrews, not homebrew_casks.
Using homebrew_casks packages the CLI tool as a Homebrew Cask, which is designed for macOS GUI applications or large binary packages. Standard CLI tools should be distributed as Homebrew Formulas (homebrews).
By migrating to homebrews instead of homebrew_casks:
- You adhere to Homebrew's guidelines (Formulas for CLI tools, Casks for GUI apps).
- You can keep the
testblock to verify the installation works. - You can keep the standard Ruby
installblock. - You can still restrict the formula to macOS-only by keeping
ids: [mac].
# Homebrew Formulas are standard for CLI tools; Linux users install via the curl script.
homebrews:
- name: shelltime
ids:
- mac
repository:
owner: shelltime
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
directory: Formula
homepage: "https://shelltime.xyz"
description: "Track and analyze your shell usage - ShellTime CLI"
license: "MIT"
commit_author:
name: shelltime-bot
email: bot@shelltime.xyz
install: |
bin.install "shelltime"
bin.install "shelltime-daemon"
test: |
system "#{bin}/shelltime", "--version"
caveats: |
Get started with a single command:
shelltime init
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (78.88%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@claude ultrareview |
|
Claude finished @AnnatarHe's task in 1m 11s —— View job Ultra Code Review — PR #292Todo:
SummaryThe archive deprecation fixes are clean and correct. The Archive Changes (
|
| Old (deprecated) | New |
|---|---|
format: tar.gz |
formats: [tar.gz] |
builds: [...] |
ids: [...] |
format_overrides[].format: zip |
format_overrides[].formats: [zip] |
Both archive entries (mt-common and mac) are updated consistently. No issues.
brews → homebrew_casks — ⚠️ Functional, but consider homebrews instead
This is the substantive design decision in the PR, and Gemini's review is correct.
What the PR does: Migrates to homebrew_casks, which publishes to Casks/shelltime.rb in the tap. Homebrew Casks are designed for GUI applications and large binary packages distributed as .dmg/.zip.
The problem: shelltime is a CLI tool. Homebrew's own guidelines explicitly reserve Casks for GUI apps. The practical consequences:
-
Breaking install command for existing users. Today:
brew install shelltime/tap/shelltime. After this:brew install --cask shelltime/tap/shelltime. The companion tap PR'stap_migrations.jsonhandles auto-migration for existing installs, but the install instructions everywhere (docs, README, shelltime.xyz/i) will need updating. -
Drops
brew test. Theteststanza is gone because Casks don't support it. Withhomebrews, you getbrew test shelltimeto verify the install works. -
Same macOS-only goal is achievable with
homebrews. The PR states macOS-only as the motivation, buthomebrewsalso supportsids: [mac]to scope it to the macOS archive. No trade-off needed.
If the goal is strictly "fix the deprecation, keep macOS-only", the simpler and convention-correct path is homebrews (as Gemini suggested):
homebrews:
- name: shelltime
ids:
- mac
repository:
owner: shelltime
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
directory: Formula
homepage: "https://shelltime.xyz"
description: "Track and analyze your shell usage - ShellTime CLI"
license: "MIT"
commit_author:
name: shelltime-bot
email: bot@shelltime.xyz
install: |
bin.install "shelltime"
bin.install "shelltime-daemon"
test: |
system "#{bin}/shelltime", "--version"
caveats: |
Get started with a single command:
shelltime init
Or set things up manually:
shelltime auth
shelltime hooks install
shelltime daemon install
Learn more at https://shelltime.xyzThis resolves all four deprecations, keeps directory: Formula, restores the test stanza, and doesn't change the user-facing install command.
Minor Notes
.goreleaser.yaml:138— the comment# Homebrew Casks are macOS-onlyis true but would be unnecessary if switching tohomebrews(sinceids: [mac]self-documents the macOS scope).ids: [mt-common]was removed from the Homebrew section (oldbrewsreferenced bothmt-commonandmac). The currentids: [mac]correctly limits to the macOS zip archive. ✓allow_different_binary_count: trueis correctly preserved in both archive entries. ✓
Verdict
Merge blocker? No — the PR passes goreleaser check and fixes the deprecations. But strongly recommend switching to homebrews before merging. The cask migration introduces a user-visible breaking change in the install command and deviates from Homebrew conventions — both avoidable if using homebrews. This also makes the companion homebrew-tap PR unnecessary (no tap_migrations.json needed).
Why
The release workflow runs
goreleaser release --cleanwithversion: "~> v2".goreleaser check(v2.16.0) reports four deprecated properties that will eventually become hard errors:Changes
archives(both entries):format:→formats: [...],builds:→ids:, andformat_overrides[].format→formats: [...].brews→homebrew_casks: Homebrew Casks are macOS-only, so the tap becomes macOS-only.binaries: [shelltime, shelltime-daemon]replaces the Rubyinstallblock.teststanza dropped (casks have none).ids: [mac]only (drops the Linux/Windowsmt-commonarchive).directory: Formula→Casks.Linux users continue installing via
curl -sSL https://shelltime.xyz/i | bash. The GitHub-release archives (incl. Linux/Windows) are unchanged.Verification
goreleaser check→ passes, no deprecations.goreleaser release --snapshot --clean --skip=publish→ builds all 4 binaries, both archive formats, and generatesdist/homebrew/Casks/shelltime.rbwithbinary "shelltime"+binary "shelltime-daemon"and caveats, scoped to macOS intel/arm.Companion PR
Requires shelltime/homebrew-tap#NEW (adds
tap_migrations.json, removes the old formula) so existing users auto-migrate to the cask. Land/release this CLI change first or together to avoid a window where the formula is gone but the cask isn't published yet.🤖 Generated with Claude Code