the sidebar is kinda out of control... too many items... tried to
organize it a bit better...
let me know what you think :D
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
also regex is not possible there currenctly, didnt realized it at the
time
refs #4255
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Add a new function `map` to template functions.
`map` creates a map from a list of pairs of key values, then you can
convert a key to a value using `.Get`. This simplifies writing
key-mapping templates. For example, the defaule `archives.name_template`
```yaml
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 }}
```
becomes
```yaml
name_template: >-
{{ $arch := map "amd64" "x86_64" "386" "i386" -}}
{{ .ProjectName }}_
{{- title .OS }}_
{{- $arch.Get .Arch .Arch }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
```
---------
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
tested this on a fake repo, and it seems to fix the problem...
seems like choco does not like when the path has `/` in it, so passing
it through `filepath.Clean` fixes it.
also improved tests a bit, and made a small docs fix.
closes https://github.com/goreleaser/goreleaser/issues/4292
allows to disable a specific custom publisher based on a template, akin
to other pipes.
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit adds a `make_latest` boolean to the release configuration,
to allow signaling to GitHub if the release should be marked as latest.
Albeit being a boolean, the internal Go type is a string to allow
to distinguish an empty string (default behavior: `true`) from an
explicit `false`.
For more information around the GitHub API field, see
https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release
I did not include the `legacy` option, to not adopt something which
appears to be scheduled for removal in the future.
In addition, I opted for `make_latest` over `latest` because the
option is only available for GitHub. Which keeps the latter key
reserved for e.g. future use of a config option which is used across
Git providers.
Fixes#4159
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit adds a `make_latest` boolean to the release configuration,
to allow signaling to GitHub if the release should be marked as latest.
Albeit being a boolean, the internal Go type is a string to allow
to distinguish an empty string (default behavior: `true`) from an
explicit `false`.
For more information around the GitHub API field, see
https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release
I did not include the `legacy` option, to not adopt something which
appears to be scheduled for removal in the future.
In addition, I opted for `make_latest` over `latest` because the
option is only available for GitHub. Which keeps the latter key
reserved for e.g. future use of a config option which is used across
Git providers.
Fixes#4159
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This adds missing fields:
- LicenseURL
- CopyrightURL
- Tags
As well as make several more fields templateable.
cc/ @twpayne
Co-authored-by: Tom Payne <tom.payne@flarm.com>
- nix.description, nix.path, and nix.homepage should allow templates
- nix.path was defaulting to wrong value, fixed
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
nfpm was updated, but we never allowed to configure the umask field in
goreleaser.
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
this will add support to winget into goreleaser.
Basically, the plan is:
- we generate the 3 needed yaml files
- we commit them to a repo
and that's it.
Initially, will probably have limited options support, and will only
have the default locale.
###### TODO
- [x] docs
- [x] review by someone who knows how this works?
- [x] test install somewhere
- [x] more tests maybe?
- [x] PR templates via API?
https://github.com/goreleaser/goreleaser/pull/4105
- [x] real project test
- [x] setup goreleaser to pr to winget as well
- [x] document sync fork stuff
https://github.com/goreleaser/goreleaser/pull/4106
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
add another include with information about PRs, to be included
everywhere `repository.md` is included, too.
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
It should make goreleaser easier to use, as a `repository` is now always
called `repository`.
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
I was really tired of copying and pasting that over and over again and
keeping it all in sync...
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>