diff --git a/flag.go b/flag.go index 05f4e1d..d6b7bb3 100644 --- a/flag.go +++ b/flag.go @@ -41,7 +41,7 @@ func parseCliArgs() { flag.Parse() if versionFlag { - fmt.Println(version.FormatVersion()) + fmt.Println("Mycorrhiza Wiki", version.FormatVersion()) os.Exit(0) } diff --git a/misc/about.go b/misc/about.go index bdda784..35b80f9 100644 --- a/misc/about.go +++ b/misc/about.go @@ -4,6 +4,7 @@ import ( "github.com/bouncepaw/mycorrhiza/cfg" "github.com/bouncepaw/mycorrhiza/l18n" "github.com/bouncepaw/mycorrhiza/user" + "github.com/bouncepaw/mycorrhiza/version" "log" "strings" "text/template" // sic! @@ -36,7 +37,7 @@ const aboutTemplateString = `

{{ printf (get .L.Title) .Cfg.WikiName }}

{{ get .L.Version }}
-
1.11.0
+
{{ .Version }}
{{ if .Cfg.UseAuth }}
{{ get .L.HomeHypha }}
{{ .Cfg.HomeHypha }}
@@ -67,6 +68,7 @@ const aboutTemplateString = ` var aboutData = struct { L map[string]L10nEntry + Version string Cfg map[string]interface{} Admins []string UserCount uint64 @@ -96,6 +98,7 @@ func AboutHTML(lc *l18n.Localizer) string { log.Fatalln(err) } data := aboutData + data.Version = version.FormatVersion() data.Admins = user.ListUsersWithGroup("admin") data.UserCount = user.Count() data.RegistrationLimit = cfg.RegistrationLimit diff --git a/version/version.go b/version/version.go index 503ac47..ecee8a9 100644 --- a/version/version.go +++ b/version/version.go @@ -28,5 +28,5 @@ func FormatVersion() string { } } - return fmt.Sprintf("Mycorrhiza Wiki %s+%s%s", taggedRelease, commitHash[:7], dirty) + return fmt.Sprintf("%s+%s%s", taggedRelease, commitHash[:7], dirty) }