new service: version

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2017-04-27 07:46:23 +00:00
parent b53105ed25
commit 2562aca1a3
14 changed files with 607 additions and 28 deletions

View File

@@ -5,7 +5,7 @@ import (
"os"
"github.com/Sirupsen/logrus"
"github.com/containerd/containerd"
"github.com/containerd/containerd/version"
"github.com/urfave/cli"
)
@@ -15,14 +15,14 @@ var (
func init() {
cli.VersionPrinter = func(c *cli.Context) {
fmt.Println(c.App.Name, containerd.Package, c.App.Version)
fmt.Println(c.App.Name, version.Package, c.App.Version)
}
}
func main() {
app := cli.NewApp()
app.Name = "ctr"
app.Version = containerd.Version
app.Version = version.Version
app.Usage = `
__
_____/ /______
@@ -61,6 +61,7 @@ containerd client
execCommand,
pauseCommand,
resumeCommand,
versionCommand,
}
app.Commands = append(app.Commands, extraCmds...)
app.Before = func(context *cli.Context) error {