feat: add git author for build info

This commit is contained in:
lilong.129
2025-03-31 11:03:30 +08:00
parent 561560accb
commit 284efabbd2
3 changed files with 5 additions and 3 deletions

View File

@@ -1 +1 @@
v5.0.0-beta-2503311054
v5.0.0-beta-2503311103

View File

@@ -19,6 +19,7 @@ var (
GitCommit = "unknown"
GitBranch = "unknown"
BuildTime = "unknown"
GitAuthor = "unknown"
)
func GetVersionInfo() string {
@@ -26,6 +27,6 @@ func GetVersionInfo() string {
if len(commitID) > 8 {
commitID = commitID[:8]
}
return fmt.Sprintf("%s (branch=%s, commit=%s, build=%s)",
VERSION, GitBranch, commitID, BuildTime)
return fmt.Sprintf("%s (branch=%s, commit=%s, author=%s, build=%s)",
VERSION, GitBranch, commitID, GitAuthor, BuildTime)
}