fix: accept Homebrew-interpolated final tag in cask URL verify - #18
Merged
Conversation
The "Confirm published cask URL pins the final tag" step grepped the dist
cask for a literal /download/<final-tag>/. But release-preflight intentionally
lets bare-v repos omit url.template, and goreleaser then renders the cask URL
as Homebrew interpolation (/download/v#{version}/) — even url.template repos
commit the interpolated form to the tap. The literal grep only passed for
repos whose dist cask happened to bake a literal tag, so the first bare-v repo
to reach the step (slck v3.1.58) failed and its homebrew/chocolatey/winget/
linux fan-out was skipped, leaving every channel stuck a release behind.
Accept either the literal final tag or the final-tag prefix plus #{version}.
A prefixed repo (jtk-v) emitting a bare v#{version} still fails, and a cask
pinning an older version still fails — both guards preserved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Confirm published cask URL pins the final tagstep inrelease.ymlgreps the dist cask for a literal/download/<final-tag>/. Butrelease-preflightintentionally lets bare-vrepos omiturl.template, and goreleaser then renders the cask URL as Homebrew interpolation —/download/v#{version}/— not a literal tag. Evenurl.templaterepos commit the interpolated form to the tap.So the literal grep only passed for casks that happened to bake a literal tag. The first bare-
vrepo to reach the new step — slck v3.1.58 — failed, and itshomebrew/chocolatey/winget/linux-packagesfan-out was skipped, leaving every distro channel a release behind (stuck at 3.1.51) even though the GitHub release published all binaries.Fix
Accept either:
/download/v3.1.58/, or#{version}—/download/v#{version}/(bare) or/download/jtk-v#{version}/(prefixed).Both forms genuinely pin the final tag; Homebrew resolves
#{version}at install. The prefix is derived by stripping the version suffix from the final tag, so the guards are preserved:jtk-v) emitting a barev#{version}still fails (wrong-prefix guard);Verified against all six cases (bare/prefixed × literal/interpolated, plus both guards).