Skip to content

Commit

Permalink
add version
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamashou committed Apr 15, 2024
1 parent 6a1ac48 commit 82764a7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ import (
"github.com/urfave/cli/v2"
)

const version = "0.20.2"

var versionCmd = &cli.Command{
Name: "version",
Usage: "print the version",
Action: func(ctx *cli.Context) error {
fmt.Println(version)
return nil
},
}

var generateCmd = &cli.Command{
Name: "generate",
Usage: "generate a graphql client based on schema",
Expand Down Expand Up @@ -49,6 +60,7 @@ func main() {
app.Usage = generateCmd.Usage
app.DefaultCommand = "generate"
app.Commands = []*cli.Command{
versionCmd,
generateCmd,
}

Expand Down

0 comments on commit 82764a7

Please sign in to comment.