Skip to content

Commit

Permalink
Merge pull request #211 from Yamashou/version
Browse files Browse the repository at this point in the history
add version cmd
  • Loading branch information
Yamashou committed Apr 15, 2024
2 parents a4d4aa7 + 82764a7 commit 2f3fb12
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 2f3fb12

Please sign in to comment.