mirror of
https://github.com/containers/podman.git
synced 2025-10-27 03:06:22 +08:00
Add podman version
Copy the way cri-o does this by adding a libpod/version Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #343 Approved by: mheon
This commit is contained in:
committed by
Atomic Bot
parent
ab88304162
commit
57b910a031
@ -7,6 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/containers/storage/pkg/reexec"
|
"github.com/containers/storage/pkg/reexec"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
"github.com/projectatomic/libpod/version"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
@ -14,8 +15,7 @@ import (
|
|||||||
// This is populated by the Makefile from the VERSION file
|
// This is populated by the Makefile from the VERSION file
|
||||||
// in the repository
|
// in the repository
|
||||||
var (
|
var (
|
||||||
podmanVersion = ""
|
exitCode = 125
|
||||||
exitCode = 125
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -30,11 +30,7 @@ func main() {
|
|||||||
app.Name = "podman"
|
app.Name = "podman"
|
||||||
app.Usage = "manage pods and images"
|
app.Usage = "manage pods and images"
|
||||||
|
|
||||||
var v string
|
app.Version = version.Version
|
||||||
if podmanVersion != "" {
|
|
||||||
v = podmanVersion
|
|
||||||
}
|
|
||||||
app.Version = v
|
|
||||||
|
|
||||||
app.Commands = []cli.Command{
|
app.Commands = []cli.Command{
|
||||||
attachCommand,
|
attachCommand,
|
||||||
|
|||||||
4
version/version.go
Normal file
4
version/version.go
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package version
|
||||||
|
|
||||||
|
// Version is the version of the build.
|
||||||
|
const Version = "0.3-dev"
|
||||||
Reference in New Issue
Block a user