mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* PLT-5860 Updated copyright date in about modal * PLT-5860 Updated copyright notice in JSX files * PLT-5860 Updated copyright notice in go files * Fixed misc copyright dates * Fixed component snapshots
31 lines
885 B
Go
31 lines
885 B
Go
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
package main
|
|
|
|
import (
|
|
"github.com/mattermost/platform/app"
|
|
"github.com/mattermost/platform/model"
|
|
"github.com/mattermost/platform/store"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Display version information",
|
|
Run: versionCmdF,
|
|
}
|
|
|
|
func versionCmdF(cmd *cobra.Command, args []string) {
|
|
initDBCommandContextCobra(cmd)
|
|
printVersion()
|
|
}
|
|
|
|
func printVersion() {
|
|
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.Srv.Store.(*store.SqlStore).SchemaVersion)
|
|
}
|