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

Source archive are not added as an artifact #3937

Closed
3 tasks done
maraino opened this issue Apr 13, 2023 · 1 comment · Fixed by #3938
Closed
3 tasks done

Source archive are not added as an artifact #3937

maraino opened this issue Apr 13, 2023 · 1 comment · Fixed by #3938
Assignees
Labels
bug Something isn't working

Comments

@maraino
Copy link

maraino commented Apr 13, 2023

What happened?

In the last version, the following source archive is not added to the list of artifacts because len(ctx.Config.Source.Files) == 0:

source:
  enabled: true
  rlcp: true
  name_template: "{{ .ProjectName }}_{{ .Version }}"

The problem seems to be these lines

if len(ctx.Config.Source.Files) == 0 {
return nil
}

Added in a recent commit 0eb3e79

Adding a file in the files property works properly, the file cannot be present in the archive and needs to be in the .gitignore, if not you will get the dirty git state error.

How can we reproduce this?

Run goreleaser release --clean --skip-publish --debug on a file with a source archive:

You are supposed to see something like this:

  • creating source archive
    • creating source archive                        file=foo_0.25.0.tar.gz
    • running git                                    args=[-c log.showSignature=false archive -o dist/foo_0.25.0.tar.gz 1434cdcc350ace025abfd12c13eea25d521cdbc0]
    • git result                                     stderr= stdout=
    • copying file                                   dst=dist/foo_0.25.0.tar.gz.bkp src=dist/foo_0.25.0.tar.gz
    • added new artifact                             name=foo_0.25.0.tar.gz path=dist/foo_0.25.0.tar.gz type=Source

And instead, you see:

  • creating source archive
    • creating source archive                        file=foo_0.24.0.tar.gz
    • running git                                    args=[-c log.showSignature=false archive -o dist/step-ca_0.24.0.tar.gz 1434cdcc350ace025abfd12c13eea25d521cdbc0]
    • git result                                     stderr= stdout=

goreleaser version

$ goreleaser --version
goreleaser version 1.17.0
commit: ffefd6c4ae257d2e9aeccb5786ba66401cc1bd78
built by: homebrew
goos: darwin
goarch: amd64

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

No response

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

that's a big oopsie from my part, fixing, thanks for reporting.

@caarlos0 caarlos0 removed the triage Issue pending triage by one of the maintainers label Apr 13, 2023
caarlos0 added a commit that referenced this issue Apr 13, 2023
closes #3937

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
caarlos0 added a commit that referenced this issue Apr 13, 2023
closes #3937

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
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.

2 participants