version.go, footer.html: display version
Closes https://gitlab.com/commento/commento/issues/122
This commit is contained in:
parent
1d1cd46c2b
commit
e46f9cf9e7
@ -2,6 +2,7 @@ package main
|
||||
|
||||
func main() {
|
||||
exitIfError(loggerCreate())
|
||||
exitIfError(versionPrint())
|
||||
exitIfError(configParse())
|
||||
exitIfError(dbConnect(5))
|
||||
exitIfError(migrate())
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -9,6 +9,11 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func versionPrint() error {
|
||||
logger.Infof("starting Commento %s", version)
|
||||
return nil
|
||||
}
|
||||
|
||||
func versionCheckStart() error {
|
||||
go func() {
|
||||
printedError := false
|
||||
|
@ -19,4 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="copyright">
|
||||
Commento [[[.Version]]]
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user