filebrowser/backend/cmd/version.go

22 lines
373 B
Go
Raw Normal View History

package cmd
import (
"fmt"
"github.com/spf13/cobra"
2020-05-31 23:12:36 +00:00
2023-06-15 01:08:09 +00:00
"github.com/gtsteffaniak/filebrowser/version"
)
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number",
Run: func(cmd *cobra.Command, args []string) {
2024-09-16 21:01:16 +00:00
fmt.Println("File Browser " + version.Version + "/" + version.CommitSHA)
},
}