mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
Revert "fix: getTag return incorrect tag, if we have more than 1 tag for 1 commit (#1164)"
This reverts commit 2403a40979cc0b2ce252abfdb7aacd00b91b4ab8.
This commit is contained in:
parent
5f0ad328be
commit
449ed95bbe
@ -74,7 +74,7 @@ func getGitInfo() (context.GitInfo, error) {
|
||||
return context.GitInfo{}, errors.Wrap(err, "couldn't get remote URL")
|
||||
}
|
||||
tag, err := getTag()
|
||||
if err != nil || tag == "" {
|
||||
if err != nil {
|
||||
return context.GitInfo{
|
||||
Commit: full,
|
||||
FullCommit: full,
|
||||
@ -122,12 +122,7 @@ func getFullCommit() (string, error) {
|
||||
}
|
||||
|
||||
func getTag() (string, error) {
|
||||
// Even when version sort is used in git-tag[1], tagnames with the same base version
|
||||
// but different suffixes are still sorted lexicographically, resulting e.g. in prerelease tags
|
||||
// appearing after the main release (e.g. "1.0-rc1" after "1.0").
|
||||
// This variable can be specified to determine the sorting order of tags with different suffixes.
|
||||
// https://git-scm.com/docs/git-config/2.19.2#git-config-versionsortsuffix
|
||||
return git.Clean(git.Run("-c", "versionsort.suffix=-", "tag", "-l", "--sort=-v:refname"))
|
||||
return git.Clean(git.Run("describe", "--tags", "--abbrev=0"))
|
||||
}
|
||||
|
||||
func getURL() (string, error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user