1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00
goreleaser/internal
Ivan Vandot 8877fe1ef4
feat: include prerelease suffix in git (#3841)
<!--

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 commit will fix bad version tag sort if there is a prerelease on
the same commit as a release tag. Current output is shown below
```
❯ git tag --points-at HEAD --sort=-version:refname --format='%(creatordate)%09%(refname)'
Thu Mar 2 21:38:51 2023 +0300   refs/tags/v1.13.0-rc3
Thu Mar 2 21:38:51 2023 +0300   refs/tags/v1.13.0
```
Test is changed to match current default value so it will fail without
this fix.

Default value `-` is set to the one that is described inside
[docs](https://goreleaser.com/how-it-works/?h=prerelease#how-it-works),
but people are still allowed to change it.

Output with fix applied
```
❯ git -c versionsort.suffix=- tag --points-at HEAD --sort -version:refname --format='%(creatordate)%09%(refname)'
Thu Mar 2 21:38:51 2023 +0300   refs/tags/v1.13.0
Thu Mar 2 21:38:51 2023 +0300   refs/tags/v1.13.0-rc3
```

<!-- # Provide links to any relevant tickets, URLs or other resources
-->
More info about `versionsort.suffix` can be found
[here](https://github.com/git/git/blob/master/Documentation/config/versionsort.txt#L5)

Docs as well both schemas are updated as well.

I am not sure if users should be allowed to change this option at all.
2023-03-19 22:19:40 -03:00
..
archivefiles test: testctx pkg (#3807) 2023-03-02 00:01:11 -03:00
artifact test: improve file not found checkings (#3831) 2023-03-04 12:16:26 -03:00
builders test: improve file not found checkings (#3831) 2023-03-04 12:16:26 -03:00
client fix: many linting issues 2023-03-19 22:17:18 -03:00
commitauthor test: testctx pkg (#3807) 2023-03-02 00:01:11 -03:00
deprecate test: testctx pkg (#3807) 2023-03-02 00:01:11 -03:00
exec test: testctx pkg (#3807) 2023-03-02 00:01:11 -03:00
extrafiles test: testctx pkg (#3807) 2023-03-02 00:01:11 -03:00
gio fix: many linting issues 2023-03-19 22:17:18 -03:00
git refactor: making it easier to merge with pro (#3463) 2022-10-14 00:31:05 -03:00
golden feat: remove gofish (#3312) 2022-08-16 01:16:45 -03:00
http test: testctx pkg (#3807) 2023-03-02 00:01:11 -03:00
ids chore: gofumpt & lint (#2190) 2021-04-25 14:20:49 -03:00
logext fix: do not do fancy 3rd party process logging (#3747) 2023-02-01 23:25:36 -03:00
middleware refactor: improve tmpls that eval to a bool (#3726) 2023-01-28 23:21:43 -03:00
pipe feat: include prerelease suffix in git (#3841) 2023-03-19 22:19:40 -03:00
pipeline feat: add digest to artifacts info of published docker images (#3540) 2022-11-12 14:51:53 -03:00
semerrgroup chore: remove duplicate word in comments (#3347) 2022-08-30 11:42:29 -03:00
shell test: testctx pkg (#3807) 2023-03-02 00:01:11 -03:00
static fix: init with extra quote 2022-12-21 23:43:30 -03:00
testctx test: testctx pkg (#3807) 2023-03-02 00:01:11 -03:00
testlib feat: add ko support (#3653) 2023-01-16 22:34:49 -03:00
tmpl feat: add base template function (#3834) 2023-03-04 12:16:37 -03:00
yaml feat(yaml): upgraded from yaml.v2 to yaml.v3 (#3004) 2022-03-29 14:00:53 -03:00