Maybe 3rd time is the charm!
This makes the CI build run on windows too, and fix broken tests/featuers on Windows.
Most of the changes are related to ignoring certain tests on windows, or making sure to use the right path separators.
More work to do in the future, probably!
#4293
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
The PR refactors tests by removing redundant `require.Error` statements
that are followed by `require.ErrorContains`. `require.ErrorContains`
will fail if `err` is `nil`, so `require.Error` is not needed.
Since Go386 now has a default value, existing configurations no longer
match 386 builds (d583861e06).
Since we used to need to write goamd64=1 to match _amd64 builds, I added
new opts to fix that. (If you think you need to set some default for
override, that would be even better)
The PR formats code by removing redundant empty lines and fixes
`//nolint` directives. Additionally, this PR adds two more rules to the
`revive` configuration: `empty-lines` and `comment-spacings`.
Removing unnecessary empty lines helps to keep the codebase clean and
concise. This issue is identified by the `revive.empty-lines` rule.
In the `//nolint` directive, there must be no spaces between `:` and the
linter name: `//nolint:gosec`. See ["Nolint
Directive"](https://golangci-lint.run/usage/false-positives/#nolint-directive).
This issue is identified by the `revive.comment-spacings` rule.
Note that it's not possible to add just a few additional rules to the
`revive.enable` list. We need to specify all: default rules plus
additional rules. See the detailed explanation
[here](https://github.com/prometheus/prometheus/pull/13068).
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>
continuing the work of #5153closes#5153
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: 世界 <i@sekai.icu>
this is different from the default signs, in the sense that this will
sign the binaries even if archive mode is not set to binary.
refs https://github.com/orgs/goreleaser/discussions/4989
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Adds code to expose the ipk configuration values and registers the ipk
package format with nfpm.
Updates the documentation with how to use the new ipk specific
configuration parameters.
**This isn't ready to merge, but I have some questions**
1. I copied the `TestIPKSpecificConfig()`
([code](https://github.com/goreleaser/goreleaser/compare/main...schmidtw:goreleaser:main#diff-912a4af69daf4d89537b6bea43a1b7fe65683128ea1be66d6ec77046c76d064dR1358))
from the `TestAPKSpecificConfig()` and found it only is really testing
if specific scripts are there or not. Since IPK doesn't have any
additional scripts, just fields in one file do I need this test
function? Is there a better way to validate the output?
2. I have run into issues where the tests expect `goreleaser` to be the
org & repo - is there a way to override this in my fork without changing
the code?
3. Is the `ToNFPAlts()` and `ToNFP()` living in the config.go file ok?
There wasn't much code in that file, so I figured I'd ask if you'd
rather this code be elsewhere.
---------
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
See <https://lists.gnu.org/archive/html/info-gnu/2019-01/msg00001.html>:
> When '-a' option is in effect, zstd compression is selected if the
> destination archive name ends in '.zst' or '.tzst'.
---------
Co-authored-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>
The PR enables
[`nolintlint`](https://golangci-lint.run/usage/linters/#nolintlint)
linter and fixes up appeared issues.
Changes:
- Enable `nolintlint` in `.golangci.yml` config.
- Remove unused `//nolint:` comments.
- Fix `nolint` comment format by removing spaces (`// nolint: dupl` ->
`//nolint:dupl`)
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
The PR cleans up unnecessary loop variable copying and enables the
[`copyloopvar`](https://golangci-lint.run/usage/linters/#copyloopvar)
linter for detecting this redundant variable copying.
#### Additional notes
After the project upgraded to Go version 1.22 in #4779, copying
variables inside a `for` loop became unnecessary. See this [blog
post](https://go.dev/blog/loopvar-preview) for a detailed explanation.
The `copyloopvar` linter is only available from `golangci-lint` v1.57
onwards, so we also need to update this tool.
This allows to use templates for commit messages in the changelog when
using `github`, `gitea`, or `gitlab` as the changelog implementation.
closes#4800
---------
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... -->
If applied, this commit will allow users to create BlueSky posts
(skeets) about their Goreleaser-built projects
<!-- Why is this change being made? -->
Because I wanted to post to BlueSky when projects I work on relating to
BlueSky are built!
<!-- # Provide links to any relevant tickets, URLs or other resources
-->
Example post made during unit testing (requires an account to see):
https://bsky.app/profile/jaygles.bsky.social/post/3kpv573c2pc2k
---------
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
this includes anchore/quill as a pipe to sign and notarize macos
binaries
TODO:
- [x] find a way to test this
- [x] docs
- [x] maybe get someone from anchore to take a look?
---------
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>