New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
invalid archive error when using goreleaser-pro #3383
Comments
not specific to goreleaser pro, I'm afraid. If you just merge the two config files manually (like so), and run goreleaser (either pro or oss), it will fail as well. The problem seems to be in an error handling for different binary counts, not taking into account that the second archive (idx 1) is binary format... I'll if its fixable, and either way will make the error clearer... |
closes #3383 Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
fixed in #3385 |
closes #3383 Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
fwiw, I'm planning to release this late sunday (gmt-3), but I'll release a pro nightly right now. you can also work around it by adding multiple archive configs (one for each build id) as a workaround. thanks for reporting this, it has been a bug for a long time :D edit: link: https://github.com/goreleaser/goreleaser-pro/releases/tag/nightly |
Thanks @caarlos0 devs here are going to appreciate this a lot! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
When using goreleaser-pro's
includes
feature and generating multiple binaries and a single archive we get an error.The error is
invalid archive: 1: archive has different count of built binaries for each platform, which may cause your users confusion. Please make sure all builds used have the same set of goos/goarch/etc or split it into multiple archives
.At our company we use a common
.goreleaser.common.yml
file across all modules with sane defaults for us. One of those common configs is to not generate any archives (we do not need them generally and creating archives increases the build times due to time spent compressing the binaries).You can see how we configure that here in my replication of the issue: https://github.com/ryancurrah/goreleaser-pro-bug/blob/main/.goreleaser.common.yml.
Using that common config and then creating an archive in the
.goreleaser.yml
for a CLI we get the above error. Example.goreleaser.yml
here: https://github.com/ryancurrah/goreleaser-pro-bug/blob/main/.goreleaser.yaml.Important note it is only when there is more than two builds this error occurs. If you comment out the
api
build in my example we will not run in to the error.How can we reproduce this?
I have created simple replication of the issue in a git repository located here: https://github.com/ryancurrah/goreleaser-pro-bug.
Run the following commands to reproduce the error.
goreleaser version
GoReleaser Check
Search
Code of Conduct
Additional context
This has been an issue for a while I just haven't had the time to report it. So it's not something new that broke.
The text was updated successfully, but these errors were encountered: