Files
filebrowser/cmd/version.go
T

22 lines
376 B
Go
Raw Normal View History

2019-01-05 22:44:33 +00:00
package cmd
import (
2019-02-15 12:54:44 +01:00
"fmt"
2019-01-05 22:44:33 +00:00
"github.com/spf13/cobra"
2020-06-01 01:12:36 +02:00
"github.com/filebrowser/filebrowser/v2/version"
2019-01-05 22:44:33 +00:00
)
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
2019-02-15 12:54:44 +01:00
Short: "Print the version number",
2019-01-05 22:44:33 +00:00
Run: func(cmd *cobra.Command, args []string) {
2019-05-12 21:08:43 +01:00
fmt.Println("File Browser v" + version.Version + "/" + version.CommitSHA)
2019-01-05 22:44:33 +00:00
},
}