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 <nalin@redhat.com>

Closes: #131
Approved by: nalind
This commit is contained in:
Nalin Dahyabhai
2017-06-02 11:03:23 -04:00
committed by Atomic Bot
parent 8ced1276e5
commit 7d2d8761e9

View File

@@ -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[:]