Skip to content

Commit

Permalink
fix(nfpm): Add extension to produced artifacts (#3940)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mbamber and caarlos0 committed Apr 13, 2023
1 parent b36e30a commit ac19f90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/pipe/nfpm/nfpm.go
Expand Up @@ -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,
},
})
Expand Down
1 change: 1 addition & 0 deletions internal/pipe/nfpm/nfpm_test.go
Expand Up @@ -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
Expand Down

0 comments on commit ac19f90

Please sign in to comment.