1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-04 03:11:55 +02:00

fix(nfpm): Add extension to produced artifacts (#3940)

Add extension to produced artifacts so that they can be filtered in
later steps

Fixes #3933

Co-authored-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Matthew Bamber 2023-04-13 15:42:58 +01:00 committed by GitHub
parent b36e30a071
commit ac19f902b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -443,6 +443,7 @@ func create(ctx *context.Context, fpm config.NFPM, format string, binaries []*ar
artifact.ExtraBuilds: binaries,
artifact.ExtraID: fpm.ID,
artifact.ExtraFormat: format,
artifact.ExtraExt: format,
extraFiles: contents,
},
})

View File

@ -281,6 +281,7 @@ func TestRunPipe(t *testing.T) {
for _, pkg := range packages {
format := pkg.Format()
require.NotEmpty(t, format)
require.Equal(t, pkg.Format(), artifact.ExtraOr(*pkg, artifact.ExtraExt, ""))
arch := pkg.Goarch
if pkg.Goarm != "" {
arch += "v" + pkg.Goarm