2016-06-03 01:09:14 +00:00
|
|
|
package command
|
2012-08-06 23:54:53 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"runtime"
|
2014-10-26 18:34:55 +00:00
|
|
|
|
2019-09-02 10:28:40 +00:00
|
|
|
"github.com/joeslay/seaweedfs/weed/util"
|
2012-08-06 23:54:53 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var cmdVersion = &Command{
|
|
|
|
Run: runVersion,
|
|
|
|
UsageLine: "version",
|
2015-04-16 21:11:25 +00:00
|
|
|
Short: "print SeaweedFS version",
|
|
|
|
Long: `Version prints the SeaweedFS version`,
|
2012-08-06 23:54:53 +00:00
|
|
|
}
|
|
|
|
|
2012-09-24 09:01:53 +00:00
|
|
|
func runVersion(cmd *Command, args []string) bool {
|
2012-08-06 23:54:53 +00:00
|
|
|
if len(args) != 0 {
|
|
|
|
cmd.Usage()
|
|
|
|
}
|
|
|
|
|
2014-03-25 20:46:59 +00:00
|
|
|
fmt.Printf("version %s %s %s\n", util.VERSION, runtime.GOOS, runtime.GOARCH)
|
2012-08-07 01:20:26 +00:00
|
|
|
return true
|
2012-08-06 23:54:53 +00:00
|
|
|
}
|