package cmd import ( "fmt" "github.com/spf13/cobra" "go.bigb.es/cacher/internal/version" ) const banner = ` _ ___ __ _ ___ _ __ | |__ ___ _ __ / __/ _` + "`" + ` |/ __| '_ \| '_ \ / _ \ '__| | (_| (_| | (__| | | | | | | __/ | \___\__,_|\___|_| |_|_| |_|\___|_|` var versionCmd = &cobra.Command{ Use: "version", Short: "Print version information", Run: func(cmd *cobra.Command, args []string) { info := version.Get() fmt.Println(banner) fmt.Println("cacher: S3-backed CI cache helper for builds.sr.ht — replaces .builds/lib/ci-lib.sh") fmt.Println("go.bigb.es/cacher") fmt.Println() fmt.Println(info) }, } func init() { rootCmd.AddCommand(versionCmd) }