mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
mainVersion: Remove minio init and quiet handling (#3739)
This commit is contained in:
parent
22909c849e
commit
a53b909fcd
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Minio Cloud Storage, (C) 2015 Minio, Inc.
|
||||
* Minio Cloud Storage, (C) 2015, 2016, 2017 Minio, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -25,7 +25,12 @@ var versionCmd = cli.Command{
|
||||
Name: "version",
|
||||
Usage: "Print version.",
|
||||
Action: mainVersion,
|
||||
Flags: globalFlags,
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "help, h",
|
||||
Usage: "Show this help.",
|
||||
},
|
||||
},
|
||||
CustomHelpTemplate: `NAME:
|
||||
minio {{.Name}} - {{.Usage}}
|
||||
|
||||
@ -35,8 +40,8 @@ USAGE:
|
||||
FLAGS:
|
||||
{{range .Flags}}{{.}}
|
||||
{{end}}
|
||||
|
||||
`,
|
||||
VERSION:
|
||||
` + Version + `{{"\n"}}`,
|
||||
}
|
||||
|
||||
func mainVersion(ctx *cli.Context) {
|
||||
@ -44,13 +49,6 @@ func mainVersion(ctx *cli.Context) {
|
||||
cli.ShowCommandHelpAndExit(ctx, "version", 1)
|
||||
}
|
||||
|
||||
// Initialization routine, such as config loading, enable logging, ..
|
||||
minioInit(ctx)
|
||||
|
||||
if globalQuiet {
|
||||
return
|
||||
}
|
||||
|
||||
console.Println("Version: " + Version)
|
||||
console.Println("Release-Tag: " + ReleaseTag)
|
||||
console.Println("Commit-ID: " + CommitID)
|
||||
|
Loading…
Reference in New Issue
Block a user