* remove global app references

* test fix

* fix api4 test compilation
Этот коммит содержится в:
Chris
2017-09-12 09:19:52 -05:00
коммит произвёл GitHub
родитель 674a606bd0
Коммит b066b6df13
37 изменённых файлов: 724 добавлений и 1434 удалений

Просмотреть файл

@@ -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())
}