Consolidate Dockerfile into root and consolidate version into config (#1118)

* Consolidate Dockerfile into root and consolidate version into config

* Correct the build args here
This commit is contained in:
Aaron Ogle
2021-06-17 21:27:17 -05:00
committed by GitHub
parent 1e72fc8e93
commit b502849184
6 changed files with 38 additions and 68 deletions

View File

@@ -2,6 +2,7 @@ package config
import (
"fmt"
"time"
)
// These are runtime-set values used for configuration.
@@ -33,11 +34,19 @@ var GitCommit = ""
// BuildPlatform is the optional platform this release was built for.
var BuildPlatform = "dev"
func GetCommit() string {
if GitCommit == "" {
GitCommit = time.Now().Format("20060102")
}
return GitCommit
}
// GetReleaseString gets the version string.
func GetReleaseString() string {
var versionNumber = VersionNumber
var buildPlatform = BuildPlatform
var gitCommit = GitCommit
var gitCommit = GetCommit()
return fmt.Sprintf("Owncast v%s-%s (%s)", versionNumber, buildPlatform, gitCommit)
}