Skip to content

Commit

Permalink
Added version sub-command
Browse files Browse the repository at this point in the history
  • Loading branch information
Galzzly committed Jun 13, 2023
1 parent 132008d commit 9c99e99
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/root.go
Expand Up @@ -13,10 +13,17 @@ import (

var (
cfgFile string
version string = "0.0.9"
rootCmd = &cobra.Command{
Use: "ghost",
Short: fmt.Sprintf("\n%v Ghost is an experimental CLI that intelligently scaffolds a GitHub Action workflow based on your local application stack and natural language, using OpenAI.", emoji.Ghost),
}
versionCmd = &cobra.Command{
Use: "version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("Ghost Version: %v", version)
},
}
)

func Execute() error {
Expand All @@ -31,6 +38,7 @@ func init() {

rootCmd.CompletionOptions.HiddenDefaultCmd = true
rootCmd.AddCommand(runCmd, configCmd)
rootCmd.AddCommand(versionCmd)
}

func InitConfig() {
Expand Down Expand Up @@ -59,4 +67,4 @@ func InitConfig() {
}
}
}
}
}

0 comments on commit 9c99e99

Please sign in to comment.