Issues with multiple build artifacts and packaging into archives #4624
-
I'm trying to release an application that contains multiple binaries/entrypoints. This seems to work for almost everything except Archives and homebrews that's giving me some issues. What am I doing wrong here? Every artifact is supposed to have two binaries, Here's the output of homebrew which reflects what is in the archives as well. Basically, gdg is in: gdg_Darwin_all.tar.gz Every package should contain all builds, so what am I missing? What behavior is making some tar.gz contain one or both. It seems like it's specific to OSX Darwin build while the Linux and windows artifacts seems to work fine (Windows not listed above but that packages up correctly)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
I tried your config here, and it seems to have worked properly: # typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class Gdg < Formula
desc "Grafana Dash-n-Grab (GDG) -- Dashboard/DataSource Manager for grafana supporting backup/restore to local filesystem, s3, gcs, azure, and other S3 compatible storage engines."
homepage "https://software.es.net/gdg"
version "v0.0.0-next"
on_macos do
if Hardware::CPU.intel?
url "https://github.com///releases/download/v0.0.0/foo_Darwin_x86_64.tar.gz"
sha256 "f5c1c9991a73361e0131af12e94dc22a11cb1741fcd0ab53f28ae5f97bdd4636"
def install
bin.install "gdg"
bin.install "gdg-generate"
end
end
if Hardware::CPU.arm?
url "https://github.com///releases/download/v0.0.0/foo_Darwin_arm64.tar.gz"
sha256 "9f476de26f9323adf1ca515fd40b1d2abe9e2d70e6a9501ad9b56878ed5c5994"
def install
bin.install "gdg"
bin.install "gdg-generate"
end
end
end
on_linux do
if Hardware::CPU.intel?
url "https://github.com///releases/download/v0.0.0/foo_Linux_x86_64.tar.gz"
sha256 "4369f5afb293a464a93996f60c8f9098403ca64d5c3049b0fecfe7e30d5092e8"
def install
bin.install "gdg"
bin.install "gdg-generate"
end
end
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
url "https://github.com///releases/download/v0.0.0/foo_Linux_arm64.tar.gz"
sha256 "ea7d87f00f00f1797c757c34a2ac97a6d9d754d3f8e2f6e71c4cd081f1d02781"
def install
bin.install "gdg"
bin.install "gdg-generate"
end
end
end
end which version of goreleaser are you using? |
Beta Was this translation helpful? Give feedback.
ah, I actually gave you bad feedback it seems
it should be:
you need to create one universal binary for each binary you are building... the
ids: [foo bar]
thing "worked" because it actually matched nothing, asfoo bar
was treated as a single item (it should have beend[foo, bar]
.Anyway, the snipped above will fix all your problems :D