historically this is kind of a mess, some places set the prefixed ext
(e.g. `.exe`) others don't (e.g. `msi`)
this standardize it to have the preceding `.`
also makes `ByExt` works with or without it so it doesn't break anyone's
config.
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
<!--
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>
this will create a metadata artifact and allow to add them to the
release.
closes#4669closes#4682
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
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) {
^
```
Logs when no artifacts were found, and also allow to publish source
archives.
refs https://github.com/orgs/goreleaser/discussions/4585
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
since this will be a late, big release, let's remove the deprecated
stuff that expired
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
alternative to #3806
the idea is that both `context.New` and `context.Context{}` are never
used in tests.
not sure yet how much I like it, so far code does look a bit more
readable though.
---------
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* Support mTLS with client certificate when configured.
* Fix the omitempty typo.
* Add check for missing cert as well.
* Added documentation for artifactory and upload, as well as how to run mkdocs locally
* set pip version to just 3.
* Added example to the full config.
* Remove the Pipfile and update documentation to mention the task.
* update language in doc about multiarch images.
Co-authored-by: Sheridan C Rawlins <scr@ouryahoo.com>
The idea is to be able to filter by extension and send each extension to
a different place, if needed.
This also affects the artifactory pipe.
Also updated artifactory docs a bit.
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: put common extra keys in the artifact package
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: common extra fields have their own funcs
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: 2 more
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: review
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: improve middleware
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: upload tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: twitter tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: source tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: snapshot tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: improved some tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: snapcraft skip
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip slack
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip sign
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip scoop
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip reddit
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip discord
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip publish
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip nfpm
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip milestone
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip custompublishers
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip checksums
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip changelog
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip brew
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip blob
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip before
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip artifactory
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip announce
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip defaults
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: cmds
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip docker
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* chore: todo
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: go.mod
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip release
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: remove old skip pipe errors
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip teams
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip brew
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix/test: skip smtp
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip docker
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip brew and scoop
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip docker
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: skip http/artifactory
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: increase coverage
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: use t.Cleanup instead of defer
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: use t.Cleanup instead of defer
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: use t.Cleanup instead of defer
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: use t.Cleanup instead of defer
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: filepath
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: http.target template
refs #1357
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: remove unused struct
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: test
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: remove singular archive config
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: http POST
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: http POST
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: deprecate
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: upload tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: artifactory
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: http username validation
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: renames
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: merging archive in the same repo
* refactor: merging archive in the same repo
* refactor: better organizing packages
* refactor: fixing renames
* fix: new dep version
* fix: makefile
* fix: zip/tar tests
* fix: gitigonore
* fix: s3 tests
* fix: archive test