summaryrefslogtreecommitdiffstats
path: root/cmd/platform/version.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-09-12 09:19:52 -0500
committerGitHub <noreply@github.com>2017-09-12 09:19:52 -0500
commitb066b6df138e88e75cb40f1ec3e58fbd13e61909 (patch)
tree7ee0e8c935cd3bbafd15d0d07d8900af8b82a4e0 /cmd/platform/version.go
parent674a606bd00b276d0a05b3b29a3d5f5e5e7f8206 (diff)
downloadchat-b066b6df138e88e75cb40f1ec3e58fbd13e61909.tar.gz
chat-b066b6df138e88e75cb40f1ec3e58fbd13e61909.tar.bz2
chat-b066b6df138e88e75cb40f1ec3e58fbd13e61909.zip
Remove global app references (#7433)
* remove global app references * test fix * fix api4 test compilation
Diffstat (limited to 'cmd/platform/version.go')
-rw-r--r--cmd/platform/version.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/platform/version.go b/cmd/platform/version.go
index d9df65965..c34254c45 100644
--- a/cmd/platform/version.go
+++ b/cmd/platform/version.go
@@ -16,20 +16,21 @@ var versionCmd = &cobra.Command{
}
func versionCmdF(cmd *cobra.Command, args []string) error {
- if err := initDBCommandContextCobra(cmd); err != nil {
+ a, err := initDBCommandContextCobra(cmd)
+ if err != nil {
return err
}
- printVersion()
+ printVersion(a)
return nil
}
-func printVersion() {
+func printVersion(a *app.App) {
CommandPrintln("Version: " + model.CurrentVersion)
CommandPrintln("Build Number: " + model.BuildNumber)
CommandPrintln("Build Date: " + model.BuildDate)
CommandPrintln("Build Hash: " + model.BuildHash)
CommandPrintln("Build Enterprise Ready: " + model.BuildEnterpriseReady)
- CommandPrintln("DB Version: " + app.Global().Srv.Store.(*store.LayeredStore).DatabaseLayer.GetCurrentSchemaVersion())
+ CommandPrintln("DB Version: " + a.Srv.Store.(*store.LayeredStore).DatabaseLayer.GetCurrentSchemaVersion())
}