Merge pull request #561 from stevvooe/correct-versioning

version: finish version setup
This commit is contained in:
Phil Estes 2017-02-22 13:48:05 -08:00 committed by GitHub
commit a463ba33fc
5 changed files with 28 additions and 21 deletions

View file

@ -40,6 +40,12 @@ var (
global = log.WithModule(gocontext.Background(), "containerd")
)
func init() {
cli.VersionPrinter = func(c *cli.Context) {
fmt.Println(c.App.Name, containerd.Package, c.App.Version)
}
}
func main() {
app := cli.NewApp()
app.Name = "containerd"

View file

@ -9,6 +9,12 @@ import (
"github.com/urfave/cli"
)
func init() {
cli.VersionPrinter = func(c *cli.Context) {
fmt.Println(c.App.Name, containerd.Package, c.App.Version)
}
}
func main() {
app := cli.NewApp()
app.Name = "ctr"

3
cmd/dist/main.go vendored
View file

@ -15,6 +15,9 @@ var (
)
func main() {
cli.VersionPrinter = func(c *cli.Context) {
fmt.Println(os.Args[0], containerd.Package, containerd.Version)
}
app := cli.NewApp()
app.Name = "dist"
app.Version = containerd.Version