You are an experienced, pragmatic software engineering AI agent. Do not over-engineer a solution when a simple one is possible. Keep edits minimal. If you want an exception to ANY rule, you MUST stop and get permission first.
This repository is the official Homebrew tap for Coder. It contains Homebrew formulae (CLI tools) and casks (macOS packages) used by end-users via brew install.
- Primary tech: Homebrew Formula/Cask DSL (Ruby).
- Other tech: Bash helper scripts under
scripts/. - CI: GitHub Actions runs
brew test-bot(see.github/workflows/test.yml).
Typical changes are version bumps (updating version, url, and sha256) and keeping tests/install stanzas aligned with Homebrew conventions.
Formula/: Homebrew formulae (Ruby classes).Casks/: Homebrew casks (Ruby DSL blocks).scripts/: helper scripts for updating formula versions/hashes..github/workflows/: CI definition.
Formula/coder.rb: Coder v2 CLI formula (macOS arm64/amd64 + Linux amd64).Formula/coder@1.rb: Coder v1 (legacy) CLI formula (keg_only :versioned_formula).Casks/coder-desktop.rb: Coder Desktop (versioned pkg + pinnedsha256).Casks/coder-desktop-preview.rb: Deprecated preview cask (sha256 :no_check).formula_renames.json: Maps historical formula names to current ones.scripts/update-v2.sh: UpdatesFormula/coder.rbfor a new v2 release.scripts/update-v1.sh: UpdatesFormula/coder@1.rbfor a new v1 release.
Prerequisite: most commands below require Homebrew (
brew) to be installed.
- N/A: this is a tap repository (no compilation/build step in-repo).
- Format/style formulae & casks (Homebrew style checks):
brew style
- Tap syntax checks (matches CI):
brew test-bot --only-tap-syntax
- Run the same test phase CI runs for pull requests:
brew test-bot --only-formulae
Note:
brew test-botis relatively heavy but is the most reliable way to match CI behavior for this repo.
-
CI cleanup phase (useful locally when iterating with
brew test-bot):brew test-bot --only-cleanup-before
-
CI setup phase (often needed after cleanup / on first run):
brew test-bot --only-setup
- N/A.
Note:
scripts/update-*.shuse GNUsedflags (-zand-iwithout a backup extension). They’re expected to run in a GNUsedenvironment (e.g., Linux). If you’re on macOS with BSDsed, run them in a Linux container or adjust the commands.
-
Update Coder v2 formula (
Formula/coder.rb):./scripts/update-v2.sh "<version>" "<darwin-arm64-sha256>" "<darwin-amd64-sha256>" "<linux-amd64-sha256>"
-
Update Coder v1 formula (
Formula/coder@1.rb):./scripts/update-v1.sh "<version>" "<darwin-amd64-sha256>" "<linux-amd64-sha256>"
-
Computing SHA256 for downloaded artifacts:
# macOS shasum -a 256 <file> # Linux sha256sum <file>
- Keep the
versionvalue and theurltemplates in sync. - For
Formula/coder.rb, there are threesha256entries (macOS arm64, macOS amd64, Linux amd64).- The update scripts replace the 1st/2nd/3rd
sha256occurrence; avoid reordering or inserting extrasha256lines without updatingscripts/update-v2.sh.
- The update scripts replace the 1st/2nd/3rd
- Prefer deterministic
test doblocks (fast, no external state). If tests must fail, useshell_output(cmd, expected_exit_code)likeFormula/coder.rb.
- Use a pinned
sha256when the URL is versioned. - Use
sha256 :no_checkonly when the URL is intentionally unversioned (as in the deprecated preview cask).
- Don’t reorder
sha256lines in formulae if you still rely onscripts/update-*.sh(they patch by “nth match”). - Don’t add network-dependent tests or long-running integration tests to formulae; Homebrew formula tests should be quick and reproducible.
- Run at least:
brew test-bot --only-tap-syntax
- If you changed formulae, also run:
brew test-bot --only-formulae
Recent history uses concise, release-oriented subjects. Prefer:
coder <version>forFormula/coder.rbbumps (example:coder 2.30.0).coder@1 <version>or similar for v1 bumps.Coder Desktop v<version>for cask releases.
In the PR description:
- State what changed (which formula/cask + version).
- Include where the SHA256 values came from (e.g., the upstream release artifacts you downloaded).
- Include what you ran locally (or say “not run” if you couldn’t).