fix add tag bug

This commit is contained in:
Star 2024-06-07 18:35:15 +08:00
parent 5a79fdde43
commit a2191b42db

View File

@ -121,7 +121,7 @@ func addGitTag(args []string) {
newVer = args[0]
}
if newVer == "" {
if outs, err := u.RunCommand("git", "tag", "-l", "v*", "--sort=-taggerdate"); err == nil {
if outs, err := u.RunCommand("git", "tag", "-l", "v*", "--sort=taggerdate"); err == nil {
oldVer := "v0.0.0"
for i := len(outs) - 1; i >= 0; i-- {
if outs[i][0] == 'v' && strings.IndexByte(outs[i], '.') != -1 {