-
-
Notifications
You must be signed in to change notification settings - Fork 911
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
6 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.