Update Makefile

This commit is contained in:
世界 committed 2023-08-29 10:26:11 +08:00
1 parent 5a309266f0
commit e7b35be5f6
7 files changed
+220 -10

No files matched your search

+9
View File
@@ -21,3 +21,12 @@ func ReadTag() (string, error) {
}
return version.String() + "-" + shortCommit, nil
}
func ReadTagVersion() (string, error) {
currentTagRev, err := shell.Exec("git", "describe", "--tags", "--abbrev=0").ReadOutput()
if err != nil {
return "", err
}
version := badversion.Parse(currentTagRev[1:])
return version.VersionString(), nil
}