1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-14 00:06:45 -05:00
OpenDiablo2/d2common/build_info.go
2020-01-26 00:39:13 -05:00

21 lines
627 B
Go

package d2common
// BuildInfoRecord is the structure used to hold information about the current build
type BuildInfoRecord struct {
// Branch is the branch this build is based on (or 'Local' if built locally)
Branch string
// Commit is the commit hash of the build (or blank if built locally)
Commit string
}
// BuildInfo contains information about the build currently being ran
var BuildInfo BuildInfoRecord
// SetBuildInfo is called at the start of the application to generate the global BuildInfo value
func SetBuildInfo(branch, commit string) {
BuildInfo = BuildInfoRecord{
Branch: branch,
Commit: commit,
}
}