mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
Adding git commit to the version output
The Makefile must be used in order to inject the git commit via -ldflags.
This commit is contained in:
@@ -10,6 +10,8 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
var GIT_COMMIT string
|
||||
|
||||
func main() {
|
||||
if docker.SelfPath() == "/sbin/init" {
|
||||
// Running in init mode
|
||||
@@ -21,6 +23,7 @@ func main() {
|
||||
flDebug := flag.Bool("D", false, "Debug mode")
|
||||
flag.Parse()
|
||||
rcli.DEBUG_FLAG = *flDebug
|
||||
docker.GIT_COMMIT = GIT_COMMIT
|
||||
if *flDaemon {
|
||||
if flag.NArg() != 0 {
|
||||
flag.Usage()
|
||||
|
||||
Reference in New Issue
Block a user