Add the git commit to the output version
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
7146b01a3d
commit
febace3633
4 changed files with 19 additions and 4 deletions
|
@ -14,7 +14,11 @@ const usage = `High performance container daemon cli`
|
|||
func main() {
|
||||
app := cli.NewApp()
|
||||
app.Name = "ctr"
|
||||
app.Version = containerd.Version
|
||||
if containerd.GitCommit != "" {
|
||||
app.Version = fmt.Sprintf("%s commit: %s", containerd.Version, containerd.GitCommit)
|
||||
} else {
|
||||
app.Version = containerd.Version
|
||||
}
|
||||
app.Usage = usage
|
||||
app.Flags = []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue