1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-07 18:57:18 -05:00
OpenDiablo2/d2common/build_info.go

21 lines
627 B
Go
Raw Normal View History

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