1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-31 01:53:50 +02:00
goreleaser/internal/pipe
bradenhilton ac40ce8a80
feat(chocolatey): allow template in copyright, provide ctx.ReleaseNotes (#4858)
<!--

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... -->

This PR allows `chocolateys.copyright` to be templated, and provides
`ctx.ReleaseNotes` as `.Changelog`.

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

Allowing templates for the copyright will enable, for example:

```yaml
chocolateys:
- ...
  copyright: Copyright (c) 1970-{{ .Now.Format "2006" }} Foo Bar
  ...
```

Without this change:

```xml
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
  <metadata>
    ...
    <copyright>Copyright (c) 1970-{{ .Now.Format &#34;2006&#34; }} Foo Bar</copyright>
    ...
  </metadata>
  ...
</package>
```

With this change:

```xml
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
  <metadata>
    ...
    <copyright>Copyright (c) 1970-2024 Foo Bar</copyright>
    ...
  </metadata>
  ...
</package>
```

---

Providing the release notes means they can be placed directly in the
package page instead of linking to them, for example:

```yaml
chocolateys:
- ...
  release_notes: '{{ .Changelog }}'
  ...
```

Without this change:

```console
❯ goreleaser release --skip=sign,announce,publish --clean
  • starting release...
  ...
  • chocolatey packages
    ⨯ release failed after 4s                  error=template: failed to apply "{{ .Changelog }}": template: failed to apply "{{ .Changelog }}": map has no entry for key "Changelog"
```

With this change:

```xml
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
  <metadata>
    ...
    <releaseNotes>## Changelog&#xA;### Other&#xA;* cfa5cbfa5 test&#xA;</releaseNotes>
    ...
  </metadata>
  ...
</package>
```

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

---

These are already supported for WinGet.

There is probably a better way of doing this, and I've probably also
missed something, so feedback is welcome!
2024-06-11 09:29:55 -03:00
..
announce feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
archive feat: --skip=archive (#4916) 2024-06-11 09:23:21 -03:00
artifactory feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
aur feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
before feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
blob Revert "fix(blobs): do not upload artifacts if ids is set to empty (#4921)" 2024-06-09 20:01:16 -03:00
bluesky feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
brew feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
build feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
changelog feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
checksums feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
chocolatey feat(chocolatey): allow template in copyright, provide ctx.ReleaseNotes (#4858) 2024-06-11 09:29:55 -03:00
custompublishers feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
defaults feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
discord feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
dist feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
docker feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
effectiveconfig feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
env feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
git feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
gomod feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
ko feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
krew feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
linkedin feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
mastodon feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
mattermost feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
metadata feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
milestone feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
nfpm feat(nfpm): support arm in termux (#4901) 2024-06-11 09:23:50 -03:00
nix chore: auto-update generated files 2024-06-05 00:46:45 +00:00
notary feat(notary): allow to sign without notarizing (#4919) 2024-06-11 09:20:48 -03:00
opencollective feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
partial feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
prebuild feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
project feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
publish feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
reddit feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
release feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
reportsizes feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
sbom feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
scoop feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
semver feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
sign feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
slack feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
smtp feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
snapcraft feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
snapshot feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
sourcearchive feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
teams feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
telegram feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
twitter feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
universalbinary feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
upload feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
upx feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
webhook feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
winget feat!: rename module to /v2 (#4894) 2024-05-26 15:02:57 -03:00
pipe_test.go test: simplify error asserts with require.ErrorContains (#4640) 2024-02-19 16:28:06 -03:00
pipe.go docs: remove mentions to --skip-something flags 2024-05-09 23:18:53 -03:00