diff --git a/api/main.go b/api/main.go index 8133976..148b48c 100644 --- a/api/main.go +++ b/api/main.go @@ -2,6 +2,7 @@ package main func main() { exitIfError(loggerCreate()) + exitIfError(versionPrint()) exitIfError(configParse()) exitIfError(dbConnect(5)) exitIfError(migrate()) diff --git a/api/router_static.go b/api/router_static.go index 5cdbce0..8e77c4e 100644 --- a/api/router_static.go +++ b/api/router_static.go @@ -36,6 +36,7 @@ func fileDetemplate(f string) ([]byte, error) { x = strings.Replace(x, "[[[.Origin]]]", os.Getenv("ORIGIN"), -1) x = strings.Replace(x, "[[[.CdnPrefix]]]", os.Getenv("CDN_PREFIX"), -1) x = strings.Replace(x, "[[[.Footer]]]", footer, -1) + x = strings.Replace(x, "[[[.Version]]]", version, -1) return []byte(x), nil } diff --git a/api/version.go b/api/version.go index d3f8884..1f46e67 100644 --- a/api/version.go +++ b/api/version.go @@ -9,6 +9,11 @@ import ( "time" ) +func versionPrint() error { + logger.Infof("starting Commento %s", version) + return nil +} + func versionCheckStart() error { go func() { printedError := false diff --git a/frontend/footer.html b/frontend/footer.html index f0bd3ad..313388e 100644 --- a/frontend/footer.html +++ b/frontend/footer.html @@ -19,4 +19,7 @@ +