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:
21
main.go
21
main.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user