Skip to content
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

nfpm extensions not being set #3933

Closed
3 tasks done
mbamber opened this issue Apr 12, 2023 · 7 comments · Fixed by #3940
Closed
3 tasks done

nfpm extensions not being set #3933

mbamber opened this issue Apr 12, 2023 · 7 comments · Fixed by #3940
Assignees
Labels
bug Something isn't working

Comments

@mbamber
Copy link
Contributor

mbamber commented Apr 12, 2023

What happened?

When trying to upload artifacts to Artifactory with an exts filter, the artifacts generated by nfpm are not being selected as the docs might suggest:

    # File extensions to filter for.
    # This might be useful if you have multiple packages with different
    # extensions with the same ID, and need to upload each extension to
    # a different place (e.g. nFPM packages).
    #
    # Since: v1.7
    exts:
    - deb
    - rpm

How can we reproduce this?

Example config snippet

...
nfpms:
  -
    description: My package
    formats:
      - deb
...
artifactories:
  -
    name: default
    exts:
      - .deb
...

goreleaser version

goreleaser version dev
goos: darwin
goarch: amd64
module version: v1.16.2, checksum: h1:usMTxv8JXDNUUmVo0VSTExYBwCmLOuqa1l6hkmE/diA=

https://goreleaser.com

GoReleaser Check

  • goreleaser check shows no errors

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

After a quick look at the source, I believe this an issue with the filtering. In particular, I think the Ext extra property isn't being set for artifacts generated by nfpm:

Extra: map[string]interface{}{

The attribute is set correctly for artifacts built directly:

artifact.ExtraExt: options.Ext,

@mbamber mbamber added bug Something isn't working triage Issue pending triage by one of the maintainers labels Apr 12, 2023
@caarlos0
Copy link
Member

ah yeah, your assessment is right... not sure if it got broken after some merge or what, but I think it was there at some point...

Anyway, thanks for reporting, will fix soon.

@caarlos0 caarlos0 removed the triage Issue pending triage by one of the maintainers label Apr 12, 2023
mbamber added a commit to mbamber/goreleaser that referenced this issue Apr 13, 2023
Add extension to produced artifacts so that they can be filtered in
later steps

Fixes goreleaser#3933
@mbamber
Copy link
Contributor Author

mbamber commented Apr 13, 2023

See #3940 which I think should fix this

@caarlos0
Copy link
Member

Thank you @mbamber !

mbamber added a commit to mbamber/goreleaser that referenced this issue Apr 13, 2023
Add extension to produced artifacts so that they can be filtered in
later steps

Fixes goreleaser#3933

Co-authored-by: Carlos A Becker <caarlos0@users.noreply.github.com>
caarlos0 added a commit that referenced this issue Apr 13, 2023
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>
@Romain-Geissler-1A
Copy link

Hi,

I spend some time trying to understand why my uploading task didn't work, and found it's related to exts and finally found this ;) It seems the latest fix isn't released, do you know when you will cut the next release ?

Cheers,
Romain

@caarlos0
Copy link
Member

Hey, probably next week, or earlier next month

@mbamber
Copy link
Contributor Author

mbamber commented Apr 28, 2023

I thought this was already out? I'm sure I'm using it 😅

See https://github.com/goreleaser/goreleaser/releases/tag/v1.17.1

@Romain-Geissler-1A
Copy link

Ah, I have wrongly checked the history, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants