File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -28,3 +28,4 @@ docs/GIT_BRANCH
2828docs /VERSION
2929docs /GITCOMMIT
3030dockerversion /static.go
31+ dockerversion /details.go
Original file line number Diff line number Diff line change @@ -94,14 +94,19 @@ if [ -z "$DOCKER_CLIENTONLY" ]; then
9494 DOCKER_BUILDTAGS+=" daemon"
9595fi
9696
97- rm -f dockerversion/static.go
97+ rm -f dockerversion/static.go dockerversion/details.go
98+ cat > dockerversion/details.go << EOF
99+ // AUTOGENERATED FILE; see hack/make.sh
100+ package dockerversion
101+
102+ func init() {
103+ GITCOMMIT = "$GITCOMMIT "
104+ VERSION = "$VERSION "
105+ }
106+ EOF
98107
99108# Use these flags when compiling the tests and final binary
100- LDFLAGS='
101- -w
102- -X ' $DOCKER_PKG ' /dockerversion.GITCOMMIT "' $GITCOMMIT ' "
103- -X ' $DOCKER_PKG ' /dockerversion.VERSION "' $VERSION ' "
104- '
109+ LDFLAGS=' -w'
105110LDFLAGS_STATIC=' -linkmode external'
106111EXTLDFLAGS_STATIC=' -static'
107112# ORIG_BUILDFLAGS is necessary for the cross target which cannot always build
You can’t perform that action at this time.
0 commit comments