Add the git commit to the output version

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure
2016-03-18 15:29:22 -07:00
parent 7146b01a3d
commit febace3633
4 changed files with 19 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"fmt"
"net"
"os"
"sync"
@@ -52,7 +53,11 @@ func main() {
appendPlatformFlags()
app := cli.NewApp()
app.Name = "containerd"
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 = daemonFlags
setAppBefore(app)