HealthCheck: show enterprise commit (#75242)

This commit is contained in:
Ezequiel Victorero
2023-09-22 08:17:10 -03:00
committed by GitHub
parent 3529b7413d
commit 4cfc834c08
10 changed files with 102 additions and 30 deletions
+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)
}