Skip to content

Commit

Permalink
Add version command.
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
  • Loading branch information
dominikschulz committed Jan 9, 2023
1 parent cd83862 commit 318dad5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func main() {

app := cli.NewApp()
app.Name = name
app.Version = version
app.Version = getVersion().String()
app.Usage = "Setup and run gopass-jsonapi as native messaging hosts, e.g. for browser plugins"
app.EnableBashCompletion = true
app.Action = func(c *cli.Context) error {
Expand Down Expand Up @@ -110,6 +110,14 @@ func main() {
},
},
},
{
Name: "version",
Action: func(c *cli.Context) error {
cli.VersionPrinter(c)

return nil
},
},
}

if err := app.RunContext(ctx, os.Args); err != nil {
Expand Down

0 comments on commit 318dad5

Please sign in to comment.