1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
Commit Graph

1035 Commits

Author SHA1 Message Date
standstaff
994d01a0ce
fix: remove repetitive words (#4701)
<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->


<!-- If applied, this commit will... -->

...

<!-- Why is this change being made? -->

...

<!-- # Provide links to any relevant tickets, URLs or other resources
-->

...

Signed-off-by: standstaff <zhengxingru@yeah.net>
2024-03-15 09:49:32 -03:00
世界
6f356ffcfa
fix: do not log release published if it is a draft (#4691)
it's a bit scary

---------

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-14 22:47:08 -03:00
Vedant
263cd059f2
feat(winget): update manifest version to 1.6.0 (#4658)
Use the latest schema `1.6.0` available on winget-pkgs.

The new schema supports some new fields, but they do not affect
goreleaser. Hence, this PR is safe to merge, like
https://github.com/goreleaser/goreleaser/pull/4298 was 👍🏻
2024-02-27 09:51:44 -03:00
Carlos Alexandro Becker
4d2bcfdc46
feat(brew): allow to set headers in the url (#4648)
closes  #4647

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-02-26 17:22:12 -03:00
Oleksandr Redko
305663fb5d
test: simplify error asserts with require.ErrorContains (#4640)
The PR refactors tests:
- change two lines `require.Error + require.Contains` with one
`require.ErrorContains`;
- change `require.Error + require.Equal` with `require.EqualError`.
2024-02-19 16:28:06 -03:00
Kirill Nikolaev
ef90821ee7
feat(pipe/release): Mark GitHub releases as non-draft only after all artifacts are uploaded. (#4626)
Previously end-users would see missing artifacts if trying to use latest
version while artifacts are being uploaded.

This currently applies only to GitHub releases. GitLab does not support
drafts, and I don't dare to make the change for Gitea since I don't use
it (and can't test easily).

---------

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-02-19 12:50:47 +00:00
Carlos Alexandro Becker
42d2db2021
feat(nfpm): compression, fields, and predends on debs (#4632)
refs #4630

<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->


<!-- If applied, this commit will... -->

...

<!-- Why is this change being made? -->

...

<!-- # Provide links to any relevant tickets, URLs or other resources
-->

...

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-02-19 08:51:36 -03:00
Carlos Alexandro Becker
d9e9e82ca7
feat(nfpm): also allow $NFPM_PASSPHRASE (#4633)
refs #4630

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-02-19 08:51:30 -03:00
Oleksandr Redko
a9c76d7655
chore: fix all existing lint issues (#4637)
The PR fixes lint issues, pins `golangci-lint` to `v1.56.2`, disables
`only-new-issues`, and enables `fail-on-issues` in the lint workflow.
After this, all new lint issues will fail CI.

The full log of fixed lint issues:
```sh
❯ golangci-lint run
cmd/docs.go:24:14: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
                RunE: func(cmd *cobra.Command, args []string) error {
                           ^
cmd/man.go:26:14: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
                RunE: func(cmd *cobra.Command, args []string) error {
                           ^
cmd/healthcheck.go:36:14: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
                RunE: func(cmd *cobra.Command, args []string) error {
                           ^
cmd/build.go:72:33: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
                RunE: timedRunE("build", func(cmd *cobra.Command, args []string) error {
                                              ^
cmd/schema.go:29:14: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
                RunE: func(cmd *cobra.Command, args []string) error {
                           ^
internal/pipe/nix/nix_test.go:547:5: error-is-as: second argument to require.ErrorAs should not be *error (testifylint)
                                require.ErrorAs(t, err, &tt.expectDefaultErrorIs)
                                ^
internal/pipe/nix/nix_test.go:556:5: error-is-as: second argument to require.ErrorAs should not be *error (testifylint)
                                require.ErrorAs(t, err, &tt.expectRunErrorIs)
                                ^
internal/pipe/nix/nix_test.go:567:5: error-is-as: second argument to require.ErrorAs should not be *error (testifylint)
                                require.ErrorAs(t, err, &tt.expectPublishErrorIs)
                                ^
internal/pipe/winget/winget_test.go:709:5: error-is-as: second argument to require.ErrorAs should not be *error (testifylint)
                                require.ErrorAs(t, err, &tt.expectPublishErrorIs)
                                ^
internal/pipe/winget/winget_test.go:728:5: error-is-as: second argument to require.ErrorAs should not be *error (testifylint)
                                require.ErrorAs(t, err, &tt.expectPublishErrorIs)
                                ^
internal/pipe/docker/docker_test.go:56:29: unused-parameter: parameter 'use' seems to be unused, consider removing or renaming it as _ (revive)
                return func(t *testing.T, use string) {
                                          ^
internal/gio/safe_test.go:23:4: go-require: require must only be used in the goroutine running the test function (testifylint)
                        require.Equal(t, 1, s)
                        ^
internal/gio/safe_test.go:24:4: go-require: require must only be used in the goroutine running the test function (testifylint)
                        require.NoError(t, err)
                        ^
internal/pipe/gomod/gomod_proxy_test.go:126:3: useless-assert: asserting of the same variable (testifylint)
                require.Equal(t, ctx.ModulePath, ctx.ModulePath)
                ^
internal/pipe/gomod/gomod_proxy_test.go:152:3: useless-assert: asserting of the same variable (testifylint)
                require.Equal(t, ctx.ModulePath, ctx.ModulePath)
                ^
internal/pipe/gomod/gomod_proxy_test.go:178:3: useless-assert: asserting of the same variable (testifylint)
                require.Equal(t, ctx.ModulePath, ctx.ModulePath)
                ^
internal/pipe/gomod/gomod_proxy_test.go:239:3: useless-assert: asserting of the same variable (testifylint)
                require.Equal(t, ctx.ModulePath, ctx.ModulePath)
                ^
internal/artifact/artifact_test.go:638:46: unused-parameter: parameter 'a' seems to be unused, consider removing or renaming it as _ (revive)
                require.EqualError(t, artifacts.Visit(func(a *Artifact) error {
                                                           ^
internal/pipe/milestone/milestone.go:79: File is not `gofumpt`-ed (gofumpt)

internal/http/http_test.go:217:19: unused-parameter: parameter 'k' seems to be unused, consider removing or renaming it as _ (revive)
        assetOpen = func(k string, a *artifact.Artifact) (*asset, error) {
                         ^
internal/middleware/logging/logging_test.go:12:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
        require.NoError(t, Log("foo", func(ctx *context.Context) error {
                                           ^
internal/middleware/logging/logging_test.go:16:40: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
        require.NoError(t, PadLog("foo", func(ctx *context.Context) error {
                                              ^
internal/pipe/chocolatey/chocolatey_test.go:277:15: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
                        exec: func(cmd string, args ...string) ([]byte, error) {
                                   ^
internal/client/gitlab.go:325: File is not `gofumpt`-ed (gofumpt)

internal/pipe/linkedin/client_test.go:58:77: unused-parameter: parameter 'req' seems to be unused, consider removing or renaming it as _ (revive)
        server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
                                                                                   ^
internal/middleware/errhandler/error_test.go:15:34: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                require.NoError(t, Handle(func(ctx *context.Context) error {
                                               ^
internal/middleware/errhandler/error_test.go:21:34: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                require.NoError(t, Handle(func(ctx *context.Context) error {
                                               ^
internal/middleware/errhandler/error_test.go:27:32: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                require.Error(t, Handle(func(ctx *context.Context) error {
                                             ^
internal/middleware/errhandler/error_test.go:36:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                require.NoError(t, memo.Wrap(func(ctx *context.Context) error {
                                                  ^
internal/middleware/errhandler/error_test.go:42:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                require.NoError(t, memo.Wrap(func(ctx *context.Context) error {
                                                  ^
internal/middleware/errhandler/error_test.go:48:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                require.NoError(t, memo.Wrap(func(ctx *context.Context) error {
                                                  ^
internal/pipe/ko/ko.go:175:29: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                build.WithBaseImages(func(ctx stdctx.Context, s string) (name.Reference, build.Result, error) {
                                          ^
```
2024-02-19 08:49:39 -03:00
Oleksandr Redko
dab740dd8f
test(pipe): fix tests cleanup (#4636) 2024-02-17 18:34:22 +00:00
Carlos Alexandro Becker
be511eb341
fix(nix): update licenses 2024-02-12 23:23:48 -03:00
Carlos Alexandro Becker
b33f14c0fa
fix: better universalbinary message (#4627)
<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->


<!-- If applied, this commit will... -->

...

<!-- Why is this change being made? -->

...

<!-- # Provide links to any relevant tickets, URLs or other resources
-->

...

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-02-12 22:36:21 -03:00
Carlos Alexandro Becker
e43604f4a0
feat: use go 1.22 (#4614)
- use go 1.22

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-02-09 09:57:38 -03:00
Brian Strauch
306999b78b
fix: sort order of brew artifacts (#4617)
<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->


<!-- If applied, this commit will... -->

Fix the order in which brew artifacts are sorted.

<!-- Why is this change being made? -->

* The order occasionally switches, which results in a larger diff:
https://github.com/confluentinc/homebrew-tap/pull/41
* The artifacts are already grouped by OS before `lessFnFor()` is
called, so `list[i].OS > list[j].OS` always evaluates to `false` and the
order remains unchanged. This PR removes that statement.
* It looks like a `map` is used earlier, while filtering the artifacts,
which might explain why the order occasionally switches.
* Update the remaining statement in `lessFnFor()` to actually use `<` as
the function suggests.

<!-- # Provide links to any relevant tickets, URLs or other resources
-->
2024-02-09 08:12:02 -03:00
actions-user
4f2dc3c569 chore: docs auto-update 2024-02-05 12:39:29 +00:00
Carlos Alexandro Becker
6f72ac3459
fix: improve linkedin error message
refs https://github.com/goreleaser/goreleaser/issues/4421
2024-02-01 22:56:04 -03:00
Carlos Alexandro Becker
b294759d95
feat(nfpm): add .Format tmpl var
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-31 07:31:21 -03:00
Carlos Alexandro Becker
765d534c2e
feat(nfpm): support libraries (#4587)
This adds `nfpm.libdirs` to allow to set where to put libraries built,
as well as include them in the search for artifacts when building the
package.

closes #4346

---

PS: I'm not sure about the default dirs, let me know what you think!

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-31 07:26:25 -03:00
Carlos Alexandro Becker
d5b6a533ca
Merge pull request from GHSA-h3q2-8whx-c29h
this could potentially leak environment variables.

closes GHSA-h3q2-8whx-c29h

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-29 20:53:46 -03:00
Carlos Alexandro Becker
da30c39ccb
fix(nix): prevent importing makeWrapper when it's not needed
refs 7f95ff0a9a

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-27 09:12:55 -03:00
Carlos Alexandro Becker
7f95ff0a9a
fix(nix): improve generated derivations (#4582)
- use stdenvNoCC instead of pkgs.stdenvNoCC
- always include stdenvNoCC, even if no deps
- use stdenvNoCC.is(Darwin/Linux) instead of stdenv's

refs #4358
refs 003a8815

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-27 09:01:00 -03:00
Carlos Alexandro Becker
2ced7acdd9
fix(docker): remove --builder=default from default args when use=buildx (#4566)
refs #4392

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-22 20:27:40 -03:00
Carlos Alexandro Becker
bfa9e7fd17
refactor(winget): improve winget code
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-21 23:09:32 -03:00
Carlos Alexandro Becker
ac398de727
fix(brew): improve handling of single os (#4562)
- refactors brew template into separated files using embed.FS
- moves the macos and linux packages to different template files 
- includes and indent those accordingly to which OSes are supported

closes #4561

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-19 12:41:28 -03:00
Jamie Tanna
2a71473bf6
fix: Allow using double quotes for templates in Slack notifications (#4555)
As noted in #4556, when we're using a double quote, for use with a
template variable or function, we receive a template parse error as the
value needs to be unquoted.

This provides a slightly hacky solution which is to unquote any quoted
quotes.

Closes #4556.
2024-01-19 10:57:16 -03:00
Carlos Alexandro Becker
1e0d269c97
fix(nix): sourceRoot when using archives.wrap_in_directory (#4550)
If `archives.[*].wrap_in_directory` is set, it'll create a folder inside
the archive file, usually something like `app_goos_goarch`.

In those cases, the root of the archive is not constant, so we create a
`sourceRootMap` and use it instead.

In cases where the `sourceRoot` is constant, the generated derivation
will be the same.

refs https://github.com/orgs/goreleaser/discussions/4549

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-18 12:59:04 -03:00
Carlos Alexandro Becker
003a881503
fix(nix): use stdenvNoCC
closes #4538

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-15 08:55:21 -03:00
Carlos Alexandro Becker
29f30b623e
feat: deprecated changelog.skip in favor of changelog.disable
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-14 15:57:44 -03:00
Tom Payne
f724460ac1 feat: --skip=chocolately 2024-01-09 18:22:23 -03:00
Carlos Alexandro Becker
a342f027d7 feat(blob): content disposition
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-09 09:13:08 -03:00
Carlos Alexandro Becker
0f57398745 feat(blob): deprecate kmskey 2024-01-09 09:13:08 -03:00
Carlos Alexandro Becker
88ebab066d feat(blob): cache_control
Co-authored-by: Carlos Henrique Guardão Gandarez <gandarez@gmail.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-09 09:13:08 -03:00
Carlos Alexandro Becker
189aa15101 feat(blob): acl support for s3
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: warjiang <1096409085@qq.com>
2024-01-09 09:13:08 -03:00
Carlos Alexandro Becker
e800061e86 feat(blob): allow to customize whether to force path style
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: warjiang <1096409085@qq.com>
2024-01-09 09:13:08 -03:00
Carlos Alexandro Becker
50402270ab feat(blob): deprecate disableSSL
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-09 09:13:08 -03:00
Carlos Alexandro Becker
5e9f01e6ea
feat: --skip=nfpm 2024-01-07 23:16:24 -03:00
Carlos Alexandro Becker
e7f4b10fc6
fix: prevent having whitespaces in artifact names (#4515)
refs #4513

this does not prevent the `dist` filepath to have spaces in it, although
that's likely less of an issue, but it will remove the spaces from
artifact's names.

Ideally, we could add a `tmpl.ApplyTrim` (or similar) that applies and
trim spaces, and use it everywhere it makes sense (which is likely a lot
of places).

Doing it on regular `Apply` might break things like release
footers/headers, which usually rely on empty lines (although maybe its
easier to treat those cases differently then).

Anyway, still thinking about it. Opinions are welcome :)

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-07 14:16:33 -03:00
Carlos Alexandro Becker
2ab840b675
fix: remove disgo dependency (#4521)
closes #4520

it was easy enough to remove it :)
2024-01-05 09:34:56 -03:00
Carlos Alexandro Becker
dda1c708ae
feat(nix): validate licenses (#4497)
this will check if the license provided by the user is a valid one.

valid list of licenses is generated from nix's source code.

closes #4496
2023-12-26 08:37:44 -03:00
Carlos Alexandro Becker
8586878fdf
fix(aur): support wrap_in_directory (#4502)
closes #4500

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-12-26 08:37:28 -03:00
Carlos Alexandro Becker
27f0e3304b
feat(winget): support installing .exe directly (#4498)
closes #4494

---------

Co-authored-by: Vedant <83997633+vedantmgoyal2009@users.noreply.github.com>
2023-12-26 08:37:17 -03:00
Carlos Alexandro Becker
2b9e471370
fix(nix): include unzip if any artifact is a zip (#4495)
Instead of just the first one.

refs #4224
2023-12-21 14:21:20 -03:00
Carlos Alexandro Becker
ccd8c55b4f
test: run testifylint -fix (#4483)
fix a bunch of tests

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-12-17 15:34:28 -03:00
Carlos Alexandro Becker
711490dfc7
feat: aur dir (#4484)
closes #4482

<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->


<!-- If applied, this commit will... -->

...

<!-- Why is this change being made? -->

...

<!-- # Provide links to any relevant tickets, URLs or other resources
-->

...

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-12-17 14:52:09 -03:00
Carlos Alexandro Becker
ee14837127
feat(homebrew): add os to dependency (#4481)
closes #4480
2023-12-15 12:14:01 -03:00
Carlos Alexandro Becker
22fa9947c8
feat: allow to template builds.gobinary (#4454)
closes #4453

TODO: tests
2023-12-04 23:00:11 -03:00
Carlos Alexandro Becker
142b94c533
fix: improve chocolatey no archive error handling and docs
closes #4450
2023-11-29 23:27:05 -03:00
Carlos Alexandro Becker
6f598dc9b0
refactor(brew): use cases.Title instead of strings.Title
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-11-29 23:12:46 -03:00
Carlos Alexandro Becker
a09a0d7018
fix(ko): error finishing with . 2023-11-29 23:12:07 -03:00
Carlos Alexandro Becker
d0d088dee7
test: fix 2023-11-29 22:40:10 -03:00