diff --git a/config/version.go b/config/version.go index d611b7c..c718d59 100644 --- a/config/version.go +++ b/config/version.go @@ -26,5 +26,9 @@ func init() { break } } + + if Version == "" { + Version = "development" + } } } diff --git a/frontend/frontend.go b/frontend/frontend.go index 526381c..8aa240d 100644 --- a/frontend/frontend.go +++ b/frontend/frontend.go @@ -2,7 +2,6 @@ package frontend import ( "embed" - "fmt" "html/template" "io/fs" "time" @@ -20,7 +19,7 @@ var ( Templates *template.Template funcs = template.FuncMap{ - "version": func() string { return fmt.Sprintf("better-zwave-locks %s", config.Version) }, + "version": func() string { return config.Version }, "time_since": func(t time.Time) string { return time.Since(t).Round(time.Second).String() }, } ) diff --git a/frontend/header.html b/frontend/header.html index 84d62b3..d5fcf75 100644 --- a/frontend/header.html +++ b/frontend/header.html @@ -5,7 +5,7 @@