Only compute version once

This commit is contained in:
Deluan
2022-09-14 21:09:39 -04:00
parent ebad96b8a4
commit 4cf43ed735
8 changed files with 20 additions and 10 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ func serveIndex(ds model.DataStore, fs fs.FS) http.HandlerFunc {
return
}
appConfig := map[string]interface{}{
"version": consts.Version(),
"version": consts.Version,
"firstTime": firstTime,
"variousArtistsId": consts.VariousArtistsID,
"baseURL": utils.SanitizeText(strings.TrimSuffix(conf.Server.BaseURL, "/")),
@@ -63,7 +63,7 @@ func serveIndex(ds model.DataStore, fs fs.FS) http.HandlerFunc {
}
log.Debug("UI configuration", "appConfig", appConfig)
version := consts.Version()
version := consts.Version
if version != "dev" {
version = "v" + version
}