refactor(Magefile): add build info in backend:build through ldflags

This commit is contained in:
Jordan Knott
2020-12-29 19:37:14 -06:00
parent 1bac555ebb
commit 90b92781d7
5 changed files with 80 additions and 12 deletions

21
internal/utils/version.go Normal file
View File

@ -0,0 +1,21 @@
package utils
var (
version = "dev"
commitHash = "none"
buildDate = "unknown"
)
type Info struct {
Version string
CommitHash string
BuildDate string
}
func Version() Info {
return Info{
Version: version,
CommitHash: commitHash,
BuildDate: buildDate,
}
}