Value injection at build time seems to only work for the main package

This commit is contained in:
Gabe Kangas
2020-06-24 12:55:49 -07:00
parent abb2f363af
commit a3273e9deb
3 changed files with 19 additions and 22 deletions

View File

@@ -1,20 +0,0 @@
package core
import (
"fmt"
)
// the following are injected at build-time
var (
//GitCommit is the commit which this version of owncast is running
GitCommit = "unknown"
//BuildVersion is the version
BuildVersion = "0.0.0"
//BuildType is the type of build
BuildType = "localdev"
)
//GetVersion gets the version string
func GetVersion() string {
return fmt.Sprintf("Owncast v%s-%s (%s)", BuildVersion, BuildType, GitCommit)
}