1package command 2 3import ( 4 "github.com/hashicorp/nomad/version" 5 "github.com/mitchellh/cli" 6) 7 8// VersionCommand is a Command implementation prints the version. 9type VersionCommand struct { 10 Version *version.VersionInfo 11 Ui cli.Ui 12} 13 14func (c *VersionCommand) Help() string { 15 return "" 16} 17 18func (c *VersionCommand) Name() string { return "version" } 19 20func (c *VersionCommand) Run(_ []string) int { 21 c.Ui.Output(c.Version.FullVersionNumber(true)) 22 return 0 23} 24 25func (c *VersionCommand) Synopsis() string { 26 return "Prints the Nomad version" 27} 28