hack: display build cmd when DOCKER_DEBUG set
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
877baae03e
commit
170a1c4709
2 changed files with 10 additions and 16 deletions
|
@ -60,15 +60,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