diff --git a/template.go b/template.go index becd351..74005f2 100644 --- a/template.go +++ b/template.go @@ -39,6 +39,7 @@ func setupRenderer(debug bool, registryHost, basePath string) *Template { view := jet.NewHTMLSet("templates") view.SetDevelopmentMode(debug) + view.AddGlobal("version", version) view.AddGlobal("basePath", basePath) view.AddGlobal("registryHost", registryHost) view.AddGlobal("pretty_size", func(size interface{}) string { diff --git a/templates/base.html b/templates/base.html index 8ef0a93..fcb405e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -22,8 +22,8 @@ {{yield body()}}
-
- © 2017-2018 Quiq Inc. +
+ Docker Registry UI v{{version}} © 2017-2018 Quiq Inc.
diff --git a/version.go b/version.go new file mode 100644 index 0000000..dadb5d2 --- /dev/null +++ b/version.go @@ -0,0 +1,3 @@ +package main + +const version = "0.7.3"