hack: display build cmd when DOCKER_DEBUG set
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 170a1c4709
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
b7e0725e98
commit
699e853be3
2 changed files with 10 additions and 16 deletions
|
@ -63,15 +63,10 @@ source "${MAKEDIR}/.go-autogen"
|
|||
fi
|
||||
|
||||
echo "Building $([ "$DOCKER_STATIC" = "1" ] && echo "static" || echo "dynamic") $DEST/$BINARY_FULLNAME ($PLATFORM_NAME)..."
|
||||
go build \
|
||||
-o "$DEST/$BINARY_FULLNAME" \
|
||||
"${BUILDFLAGS[@]}" \
|
||||
-ldflags "
|
||||
$LDFLAGS
|
||||
$LDFLAGS_STATIC
|
||||
$DOCKER_LDFLAGS
|
||||
" \
|
||||
${GO_PACKAGE}
|
||||
if [ -n "$DOCKER_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
go build -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" ${GO_PACKAGE}
|
||||
)
|
||||
|
||||
echo "Created binary: $DEST/$BINARY_FULLNAME"
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
LDFLAGS="${LDFLAGS} \
|
||||
-X \"github.com/docker/docker/dockerversion.Version=${VERSION}\" \
|
||||
-X \"github.com/docker/docker/dockerversion.GitCommit=${GITCOMMIT}\" \
|
||||
-X \"github.com/docker/docker/dockerversion.BuildTime=${BUILDTIME}\" \
|
||||
-X \"github.com/docker/docker/dockerversion.PlatformName=${PLATFORM}\" \
|
||||
-X \"github.com/docker/docker/dockerversion.ProductName=${PRODUCT}\" \
|
||||
-X \"github.com/docker/docker/dockerversion.DefaultProductLicense=${DEFAULT_PRODUCT_LICENSE}\" \
|
||||
"
|
||||
-X \"github.com/docker/docker/dockerversion.Version=${VERSION}\" \
|
||||
-X \"github.com/docker/docker/dockerversion.GitCommit=${GITCOMMIT}\" \
|
||||
-X \"github.com/docker/docker/dockerversion.BuildTime=${BUILDTIME}\" \
|
||||
-X \"github.com/docker/docker/dockerversion.PlatformName=${PLATFORM}\" \
|
||||
-X \"github.com/docker/docker/dockerversion.ProductName=${PRODUCT}\" \
|
||||
-X \"github.com/docker/docker/dockerversion.DefaultProductLicense=${DEFAULT_PRODUCT_LICENSE}\" "
|
||||
|
||||
# Compile the Windows resources into the sources
|
||||
if [ "$(go env GOOS)" = "windows" ]; then
|
||||
|
|
Loading…
Reference in a new issue