1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00

Bump libcompose and its dependencies

This commit is contained in:
Josh Curl
2016-05-23 17:22:40 -07:00
parent c18cd26e78
commit 50de80d09a
1109 changed files with 35052 additions and 125685 deletions

52
vendor/github.com/docker/libcompose/cli/app/version.go generated vendored Normal file
View File

@@ -0,0 +1,52 @@
package app
import (
"fmt"
"os"
"runtime"
"text/template"
"github.com/Sirupsen/logrus"
"github.com/codegangsta/cli"
"github.com/docker/libcompose/version"
)
var versionTemplate = `Version: {{.Version}} ({{.GitCommit}})
Go version: {{.GoVersion}}
Built: {{.BuildTime}}
OS/Arch: {{.Os}}/{{.Arch}}`
// Version prints the libcompose version number and additionnal informations.
func Version(c *cli.Context) {
if c.Bool("short") {
fmt.Println(version.VERSION)
return
}
tmpl, err := template.New("").Parse(versionTemplate)
if err != nil {
logrus.Fatal(err)
}
v := struct {
Version string
GitCommit string
GoVersion string
BuildTime string
Os string
Arch string
}{
Version: version.VERSION,
GitCommit: version.GITCOMMIT,
GoVersion: runtime.Version(),
BuildTime: version.BUILDTIME,
Os: runtime.GOOS,
Arch: runtime.GOARCH,
}
if err := tmpl.Execute(os.Stdout, v); err != nil {
logrus.Fatal(err)
}
fmt.Printf("\n")
return
}