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

21
main.go
View File

@@ -4,7 +4,6 @@ import (
"flag"
"os"
"strconv"
"time"
"github.com/markbates/pkger"
"github.com/owncast/owncast/logging"
@@ -18,16 +17,6 @@ import (
"github.com/owncast/owncast/utils"
)
// the following are injected at build-time.
var (
// GitCommit is the commit which this version of owncast is running.
GitCommit = ""
// BuildVersion is the version.
BuildVersion = config.StaticVersionNumber
// BuildPlatform is the type of build.
BuildPlatform = ""
)
func main() {
// Enable bundling of admin assets
@@ -46,16 +35,6 @@ func main() {
flag.Parse()
config.VersionNumber = BuildVersion
if GitCommit != "" {
config.GitCommit = GitCommit
} else {
config.GitCommit = time.Now().Format("20060102")
}
if BuildPlatform != "" {
config.BuildPlatform = BuildPlatform
}
if *logDirectory != "" {
config.LogDirectory = *logDirectory
}