From 74e706461ba44ec491f9a000004edae85e7dcf55 Mon Sep 17 00:00:00 2001 From: John Taylor Date: Fri, 24 Nov 2023 12:03:05 -0500 Subject: [PATCH] fix: allow homebrew to use tar.xz format (#4441) In a `brews` section, goreleaser will fail when using `format: tar.xz` even though homebrew supports installing binaries bundled in a `.tar.xz` archive. 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. --- internal/pipe/brew/brew.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pipe/brew/brew.go b/internal/pipe/brew/brew.go index 8cb0d4bafce..2012572f33e 100644 --- a/internal/pipe/brew/brew.go +++ b/internal/pipe/brew/brew.go @@ -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),