mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
d913e46e37
* move build command to importable package & clean up
18 lines
313 B
Go
18 lines
313 B
Go
package build
|
|
|
|
func getGitBranch() string {
|
|
v, err := runError("git", "rev-parse", "--abbrev-ref", "HEAD")
|
|
if err != nil {
|
|
return "main"
|
|
}
|
|
return string(v)
|
|
}
|
|
|
|
func getGitSha() string {
|
|
v, err := runError("git", "rev-parse", "--short", "HEAD")
|
|
if err != nil {
|
|
return "unknown-dev"
|
|
}
|
|
return string(v)
|
|
}
|