summaryrefslogtreecommitdiff
path: root/pkg/systemd
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-09-18 14:10:14 -0700
committerJhon Honce <jhonce@redhat.com>2020-09-18 15:13:58 -0700
commitc4b49afad37b4e64a1aa2b90f4d3b04626fabd44 (patch)
tree12ea0c158c3d51c3ed571706f22668ba48474d1d /pkg/systemd
parent5b7509c562e040ab8ed17990299c0b6eb52cecee (diff)
downloadpodman-c4b49afad37b4e64a1aa2b90f4d3b04626fabd44.tar.gz
podman-c4b49afad37b4e64a1aa2b90f4d3b04626fabd44.tar.bz2
podman-c4b49afad37b4e64a1aa2b90f4d3b04626fabd44.zip
Refactor version handling in cmd tree
* Move from simple string to semver objects * Change client API Version from '1' to 2.0.0 Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/systemd')
-rw-r--r--pkg/systemd/generate/containers.go2
-rw-r--r--pkg/systemd/generate/pods.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/systemd/generate/containers.go b/pkg/systemd/generate/containers.go
index a4fdae46e..8090bcd3d 100644
--- a/pkg/systemd/generate/containers.go
+++ b/pkg/systemd/generate/containers.go
@@ -256,7 +256,7 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
}
if info.PodmanVersion == "" {
- info.PodmanVersion = version.Version
+ info.PodmanVersion = version.Version.String()
}
if info.GenerateTimestamp {
info.TimeStamp = fmt.Sprintf("%v", time.Now().Format(time.UnixDate))
diff --git a/pkg/systemd/generate/pods.go b/pkg/systemd/generate/pods.go
index c41eedd17..c0acba37d 100644
--- a/pkg/systemd/generate/pods.go
+++ b/pkg/systemd/generate/pods.go
@@ -299,7 +299,7 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions)
info.ExecStopPost = "{{.Executable}} pod rm --ignore -f --pod-id-file {{.PodIDFile}}"
}
if info.PodmanVersion == "" {
- info.PodmanVersion = version.Version
+ info.PodmanVersion = version.Version.String()
}
if info.GenerateTimestamp {
info.TimeStamp = fmt.Sprintf("%v", time.Now().Format(time.UnixDate))