1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-07-02 03:35:23 +00:00
OpenDiablo2/d2common/build_info.go

21 lines
627 B
Go
Raw Normal View History

2019-11-10 08:36:53 +00:00
package d2common
2019-11-10 13:51:02 +00:00
// BuildInfoRecord is the structure used to hold information about the current build
type BuildInfoRecord struct {
2019-11-10 13:51:02 +00:00
// Branch is the branch this build is based on (or 'Local' if built locally)
Branch string
2019-11-10 13:51:02 +00:00
// Commit is the commit hash of the build (or blank if built locally)
Commit string
}
2019-11-10 13:51:02 +00:00
// BuildInfo contains information about the build currently being ran
var BuildInfo BuildInfoRecord
2019-11-10 13:51:02 +00:00
// 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,
}
}