summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-04-15 21:29:10 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-04-15 21:30:56 -0400
commit62803f8d3bacaea9956e6ec3176b223b85d260a5 (patch)
tree8cc29cace1599bec0360c16f708e11d7db45a7b6
parentd6b3bc18f85236aa753d8a8a7993d160dbdad3f8 (diff)
downloadpodman-62803f8d3bacaea9956e6ec3176b223b85d260a5.tar.gz
podman-62803f8d3bacaea9956e6ec3176b223b85d260a5.tar.bz2
podman-62803f8d3bacaea9956e6ec3176b223b85d260a5.zip
Add version to podman info command
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
-rw-r--r--libpod/define/info.go1
-rw-r--r--libpod/info.go5
2 files changed, 6 insertions, 0 deletions
diff --git a/libpod/define/info.go b/libpod/define/info.go
index e9809c367..2516cad77 100644
--- a/libpod/define/info.go
+++ b/libpod/define/info.go
@@ -8,6 +8,7 @@ type Info struct {
Host *HostInfo `json:"host"`
Store *StoreInfo `json:"store"`
Registries map[string]interface{} `json:"registries"`
+ Version Version `json:"version"`
}
//HostInfo describes the libpod host
diff --git a/libpod/info.go b/libpod/info.go
index 3cc767be6..d7ed5bb16 100644
--- a/libpod/info.go
+++ b/libpod/info.go
@@ -26,6 +26,11 @@ import (
// Info returns the store and host information
func (r *Runtime) info() (*define.Info, error) {
info := define.Info{}
+ versionInfo, err := define.GetVersion()
+ if err != nil {
+ return nil, errors.Wrapf(err, "error getting version info")
+ }
+ info.Version = versionInfo
// get host information
hostInfo, err := r.hostInfo()
if err != nil {