2022-12-02 21:50:04 -03:00
|
|
|
# Git
|
|
|
|
|
|
|
|
This allows you to change the behavior of some Git commands.
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
# .goreleaser.yaml
|
|
|
|
git:
|
|
|
|
# What should be used to sort tags when gathering the current and previous
|
|
|
|
# tags if there are more than one tag in the same commit.
|
|
|
|
#
|
2024-06-19 11:44:22 -03:00
|
|
|
# Default: '-version:refname'.
|
2022-12-02 21:50:04 -03:00
|
|
|
tag_sort: -version:creatordate
|
2023-03-20 02:19:40 +01:00
|
|
|
|
|
|
|
# What should be used to specify prerelease suffix while sorting tags when gathering
|
|
|
|
# the current and previous tags if there are more than one tag in the same commit.
|
|
|
|
prerelease_suffix: "-"
|
2023-08-27 15:57:03 -03:00
|
|
|
|
2023-09-23 02:37:48 -03:00
|
|
|
# Tags to be ignored by GoReleaser.
|
2023-08-27 15:57:03 -03:00
|
|
|
# This means that GoReleaser will not pick up tags that match any of the
|
2023-09-23 02:37:48 -03:00
|
|
|
# provided values as either previous or current tags.
|
2023-08-27 15:57:03 -03:00
|
|
|
#
|
2024-06-19 11:44:22 -03:00
|
|
|
# Templates: allowed.
|
2023-08-27 15:57:03 -03:00
|
|
|
ignore_tags:
|
|
|
|
- nightly
|
2023-09-23 02:37:48 -03:00
|
|
|
- "{{.Env.IGNORE_TAG}}"
|
2024-01-17 08:35:28 -03:00
|
|
|
|
|
|
|
# Tags that begin with these prefixes will be ignored.
|
|
|
|
#
|
|
|
|
# This feature is only available in GoReleaser Pro.
|
2024-06-19 11:44:22 -03:00
|
|
|
# Templates: allowed.
|
2024-01-17 08:35:28 -03:00
|
|
|
ignore_tag_prefixes:
|
|
|
|
- foo/
|
|
|
|
- "{{.Env.IGNORE_TAG_PREFIX}}/bar"
|
2022-12-02 21:50:04 -03:00
|
|
|
```
|
2023-09-04 14:12:01 +00:00
|
|
|
|
|
|
|
## Semver sorting
|
|
|
|
|
2024-09-03 19:57:07 -03:00
|
|
|
<!-- md:featpro -->
|
|
|
|
|
2023-09-04 14:12:01 +00:00
|
|
|
This allows you to sort tags by semver:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
# .goreleaser.yml
|
|
|
|
git:
|
|
|
|
tag_sort: semver
|
|
|
|
```
|
|
|
|
|
|
|
|
It'll parse all tags, ignoring non-semver-compatible tags, and sort from newest
|
|
|
|
to oldest, so the latest tag is returned.
|
|
|
|
|
|
|
|
This has the effect of sorting non-pre-release tags before pre-release ones,
|
|
|
|
which is different from what other git sorting options might give you.
|