HealthCheck: show enterprise commit (#75242)

This commit is contained in:
Ezequiel Victorero authored and GitHub committed 2023-09-22 08:17:10 -03:00
1 parent 3529b7413d
commit 4cfc834c08
10 files changed
+102 -30

No files matched your search

+13
View File
@@ -15,3 +15,16 @@ func getGitSha() string {
}
return string(v)
}
func getGitEnterpriseSha() string {
// supporting the old way of dev setup
v, err := runError("git", "-C", "../grafana-enterprise", "rev-parse", "--short", "HEAD")
if err != nil {
// supporting the new way of dev setup
v, err = runError("git", "-C", "..", "rev-parse", "--short", "HEAD")
if err != nil {
return ""
}
}
return string(v)
}