From 7d2d8761e971c0954cbc9df8f309227f0fd5d33b Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Fri, 2 Jun 2017 11:03:23 -0400 Subject: [PATCH] Include image-spec and runtime-spec versions Include the versions from the image-spec and runtime-spec that we were built with as part of our --version and --help output. Signed-off-by: Nalin Dahyabhai Closes: #131 Approved by: nalind --- cmd/buildah/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/buildah/main.go b/cmd/buildah/main.go index 3a4d727d9..6e40c2af4 100644 --- a/cmd/buildah/main.go +++ b/cmd/buildah/main.go @@ -1,10 +1,13 @@ package main import ( + "fmt" "os" "github.com/Sirupsen/logrus" "github.com/containers/storage" + ispecs "github.com/opencontainers/image-spec/specs-go" + rspecs "github.com/opencontainers/runtime-spec/specs-go" "github.com/projectatomic/buildah" "github.com/urfave/cli" ) @@ -17,7 +20,7 @@ func main() { app := cli.NewApp() app.Name = buildah.Package - app.Version = buildah.Version + app.Version = fmt.Sprintf("%s (image-spec %s, runtime-spec %s)", buildah.Version, ispecs.Version, rspecs.Version) app.Usage = "an image builder" if len(storage.DefaultStoreOptions.GraphDriverOptions) > 0 { var optionSlice cli.StringSlice = storage.DefaultStoreOptions.GraphDriverOptions[:]