diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-02-15 12:26:12 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-02-15 20:13:08 +0000 |
commit | 57b910a03166edbb366112afd722c9cc000cbf1f (patch) | |
tree | ec7a08715b7261358edc6dda40871e020b287fdc /cmd | |
parent | ab88304162c7013a4d5a13c1f20cb7a85531f8bd (diff) | |
download | podman-57b910a03166edbb366112afd722c9cc000cbf1f.tar.gz podman-57b910a03166edbb366112afd722c9cc000cbf1f.tar.bz2 podman-57b910a03166edbb366112afd722c9cc000cbf1f.zip |
Add podman version
Copy the way cri-o does this by adding a libpod/version
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #343
Approved by: mheon
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/main.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go index c336fa629..4034be267 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -7,6 +7,7 @@ import ( "github.com/containers/storage/pkg/reexec" "github.com/pkg/errors" + "github.com/projectatomic/libpod/version" "github.com/sirupsen/logrus" "github.com/urfave/cli" ) @@ -14,8 +15,7 @@ import ( // This is populated by the Makefile from the VERSION file // in the repository var ( - podmanVersion = "" - exitCode = 125 + exitCode = 125 ) func main() { @@ -30,11 +30,7 @@ func main() { app.Name = "podman" app.Usage = "manage pods and images" - var v string - if podmanVersion != "" { - v = podmanVersion - } - app.Version = v + app.Version = version.Version app.Commands = []cli.Command{ attachCommand, |