Skip to content

Commit

Permalink
fix: allow homebrew to use tar.xz format (#4441)
Browse files Browse the repository at this point in the history
<!-- If applied, this commit will... -->

In a `brews` section, goreleaser will fail when using `format: tar.xz`
even though homebrew supports installing binaries bundled in a `.tar.xz`
archive.

<!-- Why is this change being made? -->

I use `.tar.xz` instead of `.tar.gz` and would like goreleaser to
support this when used in conjunction with `brews` sections.

With this patch, I created a test [homebrew
formulae](https://github.com/jftuga/homebrew-tap/blob/main/awswho.rb)
and successfully installed it under macOS.
  • Loading branch information
jftuga committed Nov 24, 2023
1 parent 103b54b commit 74e7064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pipe/brew/brew.go
Expand Up @@ -215,7 +215,7 @@ func doRun(ctx *context.Context, brew config.Homebrew, cl client.ReleaseURLTempl
),
artifact.Or(
artifact.And(
artifact.ByFormats("zip", "tar.gz"),
artifact.ByFormats("zip", "tar.gz", "tar.xz"),
artifact.ByType(artifact.UploadableArchive),
),
artifact.ByType(artifact.UploadableBinary),
Expand Down

0 comments on commit 74e7064

Please sign in to comment.