update everything to go 1.20
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
do not write fields et al, let it just roll, otherwise its too noisy,
and we might expose things we are not supposed to.
closes#3741
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
The commit will add the `bare` option to ko publisher options when
set/passed via config `.goreleaser.yaml`.
Currently, even the `bare: true` is set via config, the option was never
passed to `ko` PublisherOptions.
#3742
---------
Co-authored-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
- improved how we handle `--rm-dist` deprecation so it looks more like
other deprecations
- improved deprecation error message a bit as well
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
- added a tmpl.Bool that checks if the result of a template is "true"
- added an ErrSkipper interface so Skip() methods can return errors as well
---------
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
After talking with @perylemke, we realized that probably most people
will likely expect it to be called --clean instead of --rm-dist, as its
more similar to the popular `make clean` task.
This adds the --clean flag, and make the --rm-dist one deprecated.
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
continuing the PR by @developer-guy
- [x] should be a publisher, as it does publish the images it builds
every time
- [x] `Default` method does not work
- [x] the `fromConfig` thing should probably be on the defaults, too
- [x] wire `--skip-ko`
- [x] documentation
- [x] more tests
- [x] use same registry as docker tests does
- [ ] see if we can make the log output match goreleaser's
- [ ] ??
closes#2556closes#3490
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: actions-user <actions@github.com>
Co-authored-by: Jason Hall <jason@chainguard.dev>
Co-authored-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
To help solve this issue
```
apk:
signature:
key_file: "{{ .Env.ABUILD_KEY_NAME }}.rsa"
key_name: "{{ .Env.ABUILD_KEY_NAME }}"
```
<!--
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... -->
Allow that the key_name in apk signature to be templated
<!-- Why is this change being made? -->
The name of the key might not be hardcoded, in a github workflow
<!-- # Provide links to any relevant tickets, URLs or other resources
-->
...
# If applied, this commit will
Linked issues will be resolved.
# Why is this change being made?
Because the program will no longer have to refer to nil.
# Provide links to any relevant tickets, URLs or other resources
- https://github.com/goreleaser/goreleaser/issues/3669
This prevents one announce failure to skip all other announcers.
The release will still report a failure in the end, but will not fail in
the first failure.
Also improved errors messages a little bit.
closes#3663
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
with this patch, a config like:
```yaml
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
rlcp: true
files:
- src: "build/**/*"
dst: .
nfpms:
- package_name: foo
contents:
- src: "build/**/*"
dst: usr/share/foo
formats:
- apk
```
will eval this:
<img width="1384" alt="CleanShot 2022-12-21 at 22 21 00@2x"
src="https://user-images.githubusercontent.com/245435/209034244-7c31b5f7-cfcd-4825-bb2f-7dd463c5286a.png">
as much as I would like to make this the default, it would be a breaking
change, so we really can't do it.
If `dst` is empty, it'll have the same behavior as before (no rlcp), and
if `strip_parent` is set, it will also still have the same behavior.
Finally, if the format is binary, `rlcp` is ignored too (as it doesn't
make sense).
So, this only changes if:
- your format is not binary; and
- you have files with `src` and `dst` set
Then, goreleaser will warn you to set `rlcp: true`.
## todo
- [x] docs
- [x] more tests probably
- [x] any ideas for a better name for the new config option?
fixes#3655
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
the warning was too trigger happy, this should fix it.
thanks @ioga for reporting it.
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
this allows to template the owner, group and mtime in file infos inside
archives.
should help towards reproducible builds!
goes well with #3618
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
this should help when reporting issues to github, especially the magical
"failed successfully" error
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
`List()` "materializes" the filters, so its used everywhere... if we
have multiple files with the same name there, its likely some filter
wasn't enough, or that the user configuration is faulty. Either way, we
should warn about it to help prevent release issues (like duplicated
assets on github).
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
GoReleaser evolved a lot since the last time I tried to implement this
>1 year ago.
Now its 100% possible, and way simpler to do it!
closes#3580
refs #2583
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
The replacements thing was always a bit weird, especially on archives.
We can solve that with templates, so, removing I'm deprecating it.
Also did the same on other places that had it the same feature.
Closes#3588
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>