Skip to content

chore: migrate from brews to homebrew_casks#829

Closed
patrickhoefler wants to merge 6 commits intomainfrom
chore/goreleaser-deprecations
Closed

chore: migrate from brews to homebrew_casks#829
patrickhoefler wants to merge 6 commits intomainfrom
chore/goreleaser-deprecations

Conversation

@patrickhoefler
Copy link
Copy Markdown
Owner

@patrickhoefler patrickhoefler commented Mar 27, 2026

Summary

  • Replace brews with homebrew_casks in .goreleaser.yaml — the correct Homebrew mechanism for distributing pre-built binaries, and the recommended migration path per GoReleaser's deprecation notice
  • Update graphviz dependency to use the new formula: prefix syntax
  • Update README install command to brew install --cask
  • Add *.code-workspace to .gitignore

The homebrew-tap repo has already been updated separately:

  • Old formula (dockerfilegraph.rb) removed
  • tap_migrations.json added so existing brew users auto-migrate to the cask
  • Deprecated cloudbuildgraph and ghtop formulas also removed

Test plan

  • Verify GoReleaser release succeeds without the brews deprecation warning
  • Verify the Homebrew cask is published to Casks/dockerfilegraph.rb in the tap

🤖 Generated with Claude Code

patrickhoefler and others added 2 commits March 27, 2026 18:23
- Replace `dockers` with `dockers_v2` for multi-arch builds
- Replace `brews` with `homebrew_casks`
- Update Dockerfile to use ARG TARGETPLATFORM for multi-arch support
- Add VS Code workspace file

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Without a default, the integration test's docker build fails because
the binary is at the project root, not linux/amd64/dockerfilegraph.
GoReleaser sets TARGETPLATFORM explicitly; local builds now fall back to .

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates release/distribution configuration to newer GoReleaser keys to support multi-arch container publishing and Homebrew cask-based distribution, with corresponding Dockerfile changes to align with the new Docker build layout.

Changes:

  • Update .goreleaser.yaml to use dockers_v2 for multi-arch images and homebrew_casks for Homebrew distribution.
  • Update Dockerfile to copy the binary from a TARGETPLATFORM-keyed path for GoReleaser multi-arch builds.
  • Add a VS Code workspace file to open this repo alongside the homebrew-tap repo.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
homebrew.code-workspace Adds a workspace that includes this repo and a sibling homebrew-tap checkout.
Dockerfile Switches binary COPY to use ARG TARGETPLATFORM to support GoReleaser dockers_v2 layout.
.goreleaser.yaml Migrates deprecated GoReleaser keys to dockers_v2 and homebrew_casks, and configures linux/amd64 + linux/arm64 platforms.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

patrickhoefler and others added 2 commits March 27, 2026 18:35
dockers_v2 requires a proper buildx builder (docker-container driver)
for multi-platform builds. The default docker driver doesn't set
TARGETPLATFORM, causing builds to fail.

Also update CI smoke tests to dynamically find the snapshot image tag,
since dockers_v2 in snapshot mode produces per-platform tags instead
of the plain `latest` tag.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dockers_v2 requires more careful Dockerfile changes. Reverting to the
original dockers config while keeping the brews -> homebrew_casks migration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@patrickhoefler patrickhoefler changed the title chore: migrate GoReleaser config from deprecated keys chore: migrate from brews to homebrew_casks Mar 27, 2026
@patrickhoefler patrickhoefler requested a review from Copilot March 27, 2026 21:13
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.goreleaser.yaml:37

  • Switching GoReleaser from brews to homebrew_casks likely changes how users install via Homebrew. The current README still instructs brew install patrickhoefler/tap/dockerfilegraph (formula-style); if the tap no longer provides a formula, this command will fail for new installs unless Homebrew migration covers that path. Please update the installation docs (or add an explicit note) to reflect the cask install command and expected migration behavior.
homebrew_casks:
  - repository:
      owner: patrickhoefler
      name: homebrew-tap
      token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The tap now distributes a cask instead of a formula, so the install
command requires the --cask flag.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@patrickhoefler
Copy link
Copy Markdown
Owner Author

Postponed

@patrickhoefler patrickhoefler deleted the chore/goreleaser-deprecations branch March 27, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants