summaryrefslogtreecommitdiffstats
path: root/cmd/commands/version.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-05-17 12:40:40 -0700
committerGitHub <noreply@github.com>2018-05-17 12:40:40 -0700
commit11cbb597471127c1b29e78e6cad0a1a4d93ea24c (patch)
tree0eceb950872c7234348f0b41d4492073908840d0 /cmd/commands/version.go
parent1f6c271b3bedd6656ae7155714423b1b39a669c1 (diff)
downloadchat-11cbb597471127c1b29e78e6cad0a1a4d93ea24c.tar.gz
chat-11cbb597471127c1b29e78e6cad0a1a4d93ea24c.tar.bz2
chat-11cbb597471127c1b29e78e6cad0a1a4d93ea24c.zip
Renaming platform binary to mattermost. (#8801)
Diffstat (limited to 'cmd/commands/version.go')
-rw-r--r--cmd/commands/version.go45
1 files changed, 0 insertions, 45 deletions
diff --git a/cmd/commands/version.go b/cmd/commands/version.go
deleted file mode 100644
index eaf6a1a68..000000000
--- a/cmd/commands/version.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-package commands
-
-import (
- "github.com/mattermost/mattermost-server/app"
- "github.com/mattermost/mattermost-server/cmd"
- "github.com/mattermost/mattermost-server/model"
- "github.com/mattermost/mattermost-server/store"
- "github.com/mattermost/mattermost-server/store/sqlstore"
- "github.com/spf13/cobra"
-)
-
-var VersionCmd = &cobra.Command{
- Use: "version",
- Short: "Display version information",
- RunE: versionCmdF,
-}
-
-func init() {
- cmd.RootCmd.AddCommand(VersionCmd)
-}
-
-func versionCmdF(command *cobra.Command, args []string) error {
- a, err := cmd.InitDBCommandContextCobra(command)
- if err != nil {
- return err
- }
-
- printVersion(a)
-
- return nil
-}
-
-func printVersion(a *app.App) {
- cmd.CommandPrintln("Version: " + model.CurrentVersion)
- cmd.CommandPrintln("Build Number: " + model.BuildNumber)
- cmd.CommandPrintln("Build Date: " + model.BuildDate)
- cmd.CommandPrintln("Build Hash: " + model.BuildHash)
- cmd.CommandPrintln("Build Enterprise Ready: " + model.BuildEnterpriseReady)
- if supplier, ok := a.Srv.Store.(*store.LayeredStore).DatabaseLayer.(*sqlstore.SqlSupplier); ok {
- cmd.CommandPrintln("DB Version: " + supplier.GetCurrentSchemaVersion())
- }
-}