Skip to content

Skip prereleases for Homebrew tap and AUR, add lets-beta formula#384

Merged
kindermax merged 3 commits into
masterfrom
homebrew-prerelease-channel
Jul 16, 2026
Merged

Skip prereleases for Homebrew tap and AUR, add lets-beta formula#384
kindermax merged 3 commits into
masterfrom
homebrew-prerelease-channel

Conversation

@kindermax

@kindermax kindermax commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Problem

Prerelease tags (v0.0.62-rc1, v0.0.62-rc2) were published to lets-cli/homebrew-tap's main lets formula (and AUR), so every brew upgrade shipped a release candidate to all users.

Changes

  • brews[lets] and aurs[lets-bin] get skip_upload: auto — goreleaser skips publishing when the tag has a prerelease indicator. Prerelease tags still create GitHub (pre)releases with binaries.
  • New brews[lets-beta] entry with an inverted, templated skip_upload ({{ if .Prerelease }}false{{ else }}true{{ end }}) — prerelease tags publish an opt-in Formula/lets-beta.rb: brew install lets-cli/tap/lets-beta. The two formulas declare conflicts with each other since both install the lets binary.
  • Changelog entry.

goreleaser check passes (config valid; the brews deprecation warning is pre-existing — migrating to homebrew_casks would force existing tap users to reinstall, left out of scope).

Remediation done separately

The tap's Formula/lets.rb was already reverted to v0.0.61 (lets-cli/homebrew-tap@7f36657), so brew users are back on stable now.

Verification notes

  • .Prerelease renders to e.g. rc1 for prerelease tags and empty for stable, per goreleaser template docs, so the lets-beta condition publishes only on prereleases.
  • The real end-to-end check is the next rc tag: expect lets.rb untouched, lets-beta.rb created, no AUR push.

Summary by Sourcery

Prevent prerelease versions from being pushed to stable Homebrew and AUR channels and introduce an opt-in Homebrew beta formula.

New Features:

  • Add a lets-beta Homebrew formula that is only published for prerelease tags and installable via lets-cli/tap.

Enhancements:

  • Configure the main Homebrew lets formula to skip uploads for prerelease tags and declare conflicts with the beta formula.
  • Configure the AUR lets-bin package to skip uploads for prerelease tags.

Documentation:

  • Update the changelog to document the new prerelease handling and lets-beta formula.

Prerelease tags (v0.0.62-rc1/rc2) were published to the tap's main
lets formula, upgrading all brew users to release candidates.

skip_upload: auto keeps prereleases out of the main formula and AUR.
A second brews entry publishes prerelease tags to an opt-in lets-beta
formula (templated skip_upload inverts the condition); the two
formulas conflict with each other since both install the lets binary.
@sourcery-ai

sourcery-ai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This PR updates the Goreleaser configuration to prevent prerelease tags from being published to the main Homebrew and AUR channels, introduces a separate prerelease-only Homebrew formula (lets-beta), and documents the behavior change in the changelog.

File-Level Changes

Change Details Files
Configure the main Homebrew formula and AUR package to skip publishing on prerelease tags, keeping stable channels free of release candidates.
  • Set skip_upload: auto on the primary Homebrew brew entry so prerelease tags are not uploaded to the main formula.
  • Set skip_upload: auto on the lets-bin AUR entry to avoid pushing prereleases to AUR.
  • Add a conflicts declaration on the stable Homebrew formula so it cannot be installed alongside the prerelease formula.
.goreleaser.yml
Add a dedicated prerelease Homebrew formula (lets-beta) that only publishes on prerelease tags and conflicts with the stable formula.
  • Create a new lets-beta brew entry with description, homepage, and license mirroring the main formula but indicating prerelease channel.
  • Use a templated skip_upload condition based on .Prerelease so the lets-beta formula publishes only for prerelease tags and is skipped for stable tags.
  • Declare a conflicts entry so lets-beta cannot be installed alongside the main lets formula.
  • Reuse the existing tap repository configuration (owner, name, token, directory) for the new lets-beta formula.
.goreleaser.yml
Document the new prerelease publishing behavior in the changelog.
  • Add an Unreleased changelog entry describing that prerelease tags are no longer pushed to the main Homebrew formula or AUR, and are instead published via the lets-beta formula.
  • Keep existing changelog entries intact.
docs/docs/changelog.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • The templated skip_upload for lets-beta is currently quoted as a string ('{{ if .Prerelease }}false{{ else }}true{{ end }}'); consider making this a boolean template (without quotes) or confirming Goreleaser actually interpre the rendered string as a boolean to avoid subtle config bugs.
  • You duplicate the repository and directory configuration for both lets and lets-beta brews; consider extracting these via YAML anchors or shared config to reduce repetition and make future tap changes less error-prone.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The templated `skip_upload` for `lets-beta` is currently quoted as a string (`'{{ if .Prerelease }}false{{ else }}true{{ end }}'`); consider making this a boolean template (without quotes) or confirming Goreleaser actually interpre the rendered string as a boolean to avoid subtle config bugs.
- You duplicate the `repository` and `directory` configuration for both `lets` and `lets-beta` brews; consider extracting these via YAML anchors or shared config to reduce repetition and make future tap changes less error-prone.

## Individual Comments

### Comment 1
<location path=".goreleaser.yml" line_range="74" />
<code_context>
+    description: "CLI task runner for productive developers - a better alternative to make (prerelease channel)"
+    homepage: "https://lets-cli.org/"
+    license: "MIT"
+    skip_upload: '{{ if .Prerelease }}false{{ else }}true{{ end }}'
+    conflicts:
+      - lets
</code_context>
<issue_to_address>
**issue (bug_risk):** Template for `skip_upload` is rendered as a string, which may not be parsed as a boolean as intended.

Because this field expects a boolean, the quoted template will produce a string like "true"/"false", which may not be interpreted correctly and could cause prereleases to be skipped or uploaded incorrectly. Consider using an unquoted template that renders bare `true`/`false`, or a dedicated `when`/`prerelease` condition if supported.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .goreleaser.yml
Review follow-up: skip_upload stays a quoted string template on
purpose -- goreleaser's SkipUpload is a string compared against
"true"/"auto" after template rendering, and an unquoted {{ would be
invalid YAML.
@kindermax

Copy link
Copy Markdown
Collaborator Author

Addressed review:

  • repository duplication — extracted via YAML anchor (&homebrew-tap / *homebrew-tap); goreleaser check still passes.
  • quoted skip_upload template — intentional, no change. SkipUpload is a string field in goreleaser, not a boolean: the template is rendered first, then publish compares the string against "true"/"auto" (brew.go#L130-L136, L255-L259). A rendered "false" matches neither, so it publishes. An unquoted {{ would be invalid YAML (opens a flow mapping). Added a comment in the config so this doesn't look like a bug later.

@kindermax
kindermax force-pushed the homebrew-prerelease-channel branch from 0186fc4 to c0b413f Compare July 16, 2026 07:37
@kindermax
kindermax merged commit badfa26 into master Jul 16, 2026
5 checks passed
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.

1 participant