Add version command

This commit is contained in:
Elara 2022-11-22 12:54:03 -08:00
parent 447f71a499
commit 62ed7fe1a3
1 changed files with 10 additions and 0 deletions

10
main.go
View File

@ -128,6 +128,11 @@ func main() {
Aliases: []string{"ref"}, Aliases: []string{"ref"},
Action: refreshCmd, Action: refreshCmd,
}, },
{
Name: "version",
Usage: "Display the current LURE version and exit",
Action: displayVersion,
},
}, },
} }
@ -136,3 +141,8 @@ func main() {
log.Error("Error while running app").Err(err).Send() log.Error("Error while running app").Err(err).Send()
} }
} }
func displayVersion(c *cli.Context) error {
print(version)
return nil
}