Skip to content

Commit

Permalink
docs: standarizing docs defaults, since, etc (#3898)
Browse files Browse the repository at this point in the history
- [x] if the default is the zero-value for the field, do not specify
- [ ] TODO: add a "how to read this docs" section somewhere explaining
that
- [x] if the change was introduced in a v1.x.0, say only v1.x
- [x] drop trail ending `.` from Since, Default, etc
- [x] wording: always use `Default: ` instead of `Defaults to` and
others
- [x] add a note to templateable fields
- [x] default value of a field, if its a string, always between single
quotes `'`

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Apr 2, 2023
1 parent 6ae7b08 commit d524d93
Show file tree
Hide file tree
Showing 48 changed files with 591 additions and 612 deletions.
14 changes: 9 additions & 5 deletions www/docs/customization/announce/discord.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,27 @@ After this, you can add following section to your `.goreleaser.yaml` config:
announce:
discord:
# Whether its enabled or not.
# Defaults to false.
enabled: true

# Message template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
# Templates: allowed
message_template: 'Awesome project {{.Tag}} is out!'

# Set author of the embed.
# Defaults to `GoReleaser`
#
# Default: 'GoReleaser'
author: ''

# Color code of the embed. You have to use decimal numeral system, not hexadecimal.
# Defaults to `3888754` - the grey-ish from goreleaser
#
# Default: '3888754' (the grey-ish from GoReleaser)
color: ''

# URL to an image to use as the icon for the embed.
# Defaults to `https://goreleaser.com/static/avatar.png`
#
# Default: 'https://goreleaser.com/static/avatar.png'
icon_url: ''
```

Expand Down
16 changes: 11 additions & 5 deletions www/docs/customization/announce/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# Announce

GoReleaser can also announce new releases on social networks, chat rooms and via email!
GoReleaser can also announce new releases on social networks, chat rooms and via
email!

It runs at the very end of the pipeline and can be skipped with the `--skip-announce` flag of the [`release`](/cmd/goreleaser_release/) command, or via the skip property:
It runs at the very end of the pipeline and can be skipped with the
`--skip-announce` flag of the [`release`](/cmd/goreleaser_release/) command, or
via the skip property:

```yaml
# .goreleaser.yaml
announce:
# Skip the announcing feature in some conditions, for instance, when publishing patch releases.
# Valid options are `true`, `false`, empty, or a template that evaluates to a boolean (`true` or `false`).
# Defaults to empty (which means false).
# Skip the announcing feature in some conditions, for instance, when
# publishing patch releases.
#
# Any value different from 'true' is evaluated to false.
#
# Templates: allowed
skip: "{{gt .Patch 0}}"
```
6 changes: 3 additions & 3 deletions www/docs/customization/announce/linkedin.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Then, you can add something like the following to your `.goreleaser.yaml` config
announce:
linkedin:
# Whether its enabled or not.
# Defaults to false.
enabled: true

# Message template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
# Message to use while publishing.
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
message_template: 'Awesome project {{.Tag}} is out!'
```

Expand Down
10 changes: 5 additions & 5 deletions www/docs/customization/announce/mastodon.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mastodon

> Since: v1.13.0
> Since: v1.13
For it to work, you'll need to create a new Mastodon app
`https://social.yourdomain.tld/settings/applications/new` with `write:statuses`
Expand All @@ -18,15 +18,15 @@ configuration file:
announce:
mastodon:
# Whether its enabled or not.
# Defaults to false.
enabled: true

# Message template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
# Message to use while publishing.
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
# Templates: allowed
message_template: 'Awesome project {{.Tag}} is out!'

# Mastodon server URL.
# Defaults to empty.
server: https://mastodon.social
```

Expand Down
15 changes: 9 additions & 6 deletions www/docs/customization/announce/mattermost.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@ Then, you can add something like the following to your `.goreleaser.yaml` config
announce:
mattermost:
# Whether its enabled or not.
# Defaults to false.
enabled: true

# Title template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out!`
# Title to use while publishing.
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out!'
# Templates: allowed
title_template: 'GoReleaser {{ .Tag }} was just released!'

# Message template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
# Message to use while publishing.
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
# Templates: allowed
message_template: 'Awesome project {{.Tag}} is out!'

# Color code of the message. You have to use hexadecimal.
# Defaults to `#2D313E` - the grey-ish from goreleaser
# Default: '#2D313E' (the grey-ish from GoReleaser)
color: ''

# The name of the channel that the user selected as a destination for webhook messages.
Expand Down
11 changes: 7 additions & 4 deletions www/docs/customization/announce/opencollective.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,21 @@ Then, you can add something like the following to your `.goreleaser.yaml` config
announce:
opencollective:
# Whether its enabled or not.
# Defaults to false.
enabled: true

# Collective slug
# https://opencollective.com/<slug>
slug: 'goreleaser'

# Title for the update
# Defaults to `{{ .Tag }}`
#
# Default: '{{ .Tag }}'
# Templates: allowed
title_template: 'Release of {{ .Tag }}'

# Message template to use while publishing. It can be HTML!
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out!<br/>Check it out at <a href="{{ .ReleaseURL }}">{{ .ReleaseURL }}</a>`
# Message to use while publishing. It can be HTML!
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out!<br/>Check it out at <a href="{{ .ReleaseURL }}">{{ .ReleaseURL }}</a>'
# Templates: allowed
message_template: 'Awesome project {{.Tag}} is out!'
```
9 changes: 6 additions & 3 deletions www/docs/customization/announce/reddit.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Then, you can add something like the following to your `.goreleaser.yaml` config
announce:
reddit:
# Whether its enabled or not.
# Defaults to false.
enabled: true

# Application ID for Reddit Application
Expand All @@ -23,11 +22,15 @@ announce:
username: ""

# URL template to use while publishing.
# Defaults to `{{ .ReleaseURL }}`
#
# Default: '{{ .ReleaseURL }}'
# Templates: allowed
url_template: 'https://github.com/goreleaser/goreleaser/releases/tag/{{ .Tag }}'

# Title template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out!`
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out!'
# Templates: allowed
title_template: ''GoReleaser {{ .Tag }} was just released!''
```

Expand Down
13 changes: 7 additions & 6 deletions www/docs/customization/announce/slack.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ Then, you can add something like the following to your `.goreleaser.yaml` config
announce:
slack:
# Whether its enabled or not.
# Defaults to false.
enabled: true

# Message template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
# Templates: allowed
message_template: 'Awesome project {{.Tag}} is out!'

# The name of the channel that the user selected as a destination for webhook messages.
Expand All @@ -34,18 +35,18 @@ announce:
# Blocks for advanced formatting, see: https://api.slack.com/messaging/webhooks#advanced_message_formatting
# and https://api.slack.com/messaging/composing/layouts#adding-blocks.
#
# Templating is possible inside this structure.
#
# Attention: goreleaser doesn't check the full structure of the Slack API: please make sure that
# your configuration for advanced message formatting abides by this API.
#
# Templates: allowed
blocks: []

# Attachments, see: https://api.slack.com/reference/messaging/attachments
#
# Templating is possible inside this structure.
#
# Attention: goreleaser doesn't check the full structure of the Slack API: please make sure that
# your configuration for advanced message formatting abides by this API.
#
# Templates: allowed
attachments: []
```

Expand Down
20 changes: 13 additions & 7 deletions www/docs/customization/announce/smtp.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ Then, you can add something like the following to your `.goreleaser.yaml` config
announce:
smtp:
# Whether its enabled or not.
# Defaults to false.
enabled: true

# SMTP Host.
# Default from $SMTP_HOST.
#
# Default: $SMTP_HOST
host: "smtp.gmail.com"

# SMTP Port
# Default from $SMTP_PORT.
#
# Default: $SMTP_PORT
port: 587

# Sender of the email
Expand All @@ -31,15 +32,20 @@ announce:
- ""

# Owner of the email
# Default from $SMTP_USERNAME.
#
# Default: $SMTP_USERNAME
username: ""

# Body template to use within the email.
# Defaults to `You can view details from: {{ .ReleaseURL }}`
# Body to use within the email.
#
# Default: 'You can view details from: {{ .ReleaseURL }}'
# Templates: allowed
body_template: 'https://github.com/goreleaser/goreleaser/releases/tag/{{ .Tag }}'

# Subject template to use within the email subject.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out!`
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out!'
# Templates: allowed
subject_template: ''GoReleaser {{ .Tag }} was just released!''
```

Expand Down
15 changes: 10 additions & 5 deletions www/docs/customization/announce/teams.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,28 @@ After this, you can add following section to your `.goreleaser.yaml` config:
announce:
teams:
# Whether its enabled or not.
# Defaults to false.
enabled: true

# Title template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out!`
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out!'
# Templates: allowed
title_template: 'GoReleaser {{ .Tag }} was just released!'

# Message template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
# Templates: allowed
message_template: 'Awesome project {{.Tag}} is out!'

# Color code of the message. You have to use hexadecimal.
# Defaults to `#2D313E` - the grey-ish from goreleaser
#
# Default: '#2D313E' (the grey-ish from GoReleaser)
color: ''

# URL to an image to use as the icon for the message.
# Defaults to `https://goreleaser.com/static/avatar.png`
#
# Default: 'https://goreleaser.com/static/avatar.png'
icon_url: ''
```

Expand Down
7 changes: 3 additions & 4 deletions www/docs/customization/announce/telegram.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@ config:
announce:
telegram:
# Whether its enabled or not.
#
# Defaults to false.
enabled: true

# Integer representation of your channel
#
# Templateable. (since v1.15)
# Templates: allowed (since v1.15)
chat_id: 123456

# Message template to use while publishing.
#
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
# Default: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
# Templates: allowed
message_template: 'Awesome project {{.Tag}} is out!'
```

Expand Down
5 changes: 3 additions & 2 deletions www/docs/customization/announce/twitter.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ Then, you can add something like the following to your `.goreleaser.yaml` config
announce:
twitter:
# Whether its enabled or not.
# Defaults to false.
enabled: true

# Message template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
# Templates: allowed
message_template: 'Awesome project {{.Tag}} is out!'
```

Expand Down
12 changes: 7 additions & 5 deletions www/docs/customization/announce/webhook.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Webhook

Since: v1.3.
> Since: v1.3
Webhooks are a way to receive notifications. With this `Goreleaser` functionality, you can send events to any server
exposing a webhook.
Expand All @@ -17,18 +17,20 @@ Add following to your `.goreleaser.yaml` config to enable the webhook functional
announce:
webhook:
# Whether its enabled or not.
# Defaults to false.
enabled: true

# Check the certificate of the webhook. Defaults to false.
# Check the certificate of the webhook.
skip_tls_verify: true

# Message template to use while publishing.
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`
#
# Default: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
# Templates: allowed
message_template: '{ "title": "Awesome project {{.Tag}} is out!"}'

# Content type to use.
# Defaults to `"application/json; charset=utf-8"`
#
# Default: 'application/json; charset=utf-8'
content_type: "application/json"

# Endpoint to send the webhook to.
Expand Down

0 comments on commit d524d93

Please sign in to comment.