From 57b910a03166edbb366112afd722c9cc000cbf1f Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 15 Feb 2018 12:26:12 -0500 Subject: Add podman version Copy the way cri-o does this by adding a libpod/version Signed-off-by: Daniel J Walsh Closes: #343 Approved by: mheon --- cmd/podman/main.go | 10 +++------- version/version.go | 4 ++++ 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 version/version.go 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, diff --git a/version/version.go b/version/version.go new file mode 100644 index 000000000..65e069b53 --- /dev/null +++ b/version/version.go @@ -0,0 +1,4 @@ +package version + +// Version is the version of the build. +const Version = "0.3-dev" -- cgit v1.2.3-54-g00ecf