ficsit-cli-flake/cmd/version.go

15 lines
298 B
Go
Raw Normal View History

2022-06-08 20:56:32 +00:00
package cmd
import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print current version information",
Run: func(cmd *cobra.Command, args []string) {
println(viper.GetString("version"), "-", viper.GetString("commit"))
},
}