mirror of https://github.com/docker/docs.git
Unify dyntest/test and dynbinary/binary hack bundlescripts further by cross-invocation and keeping all the logic in one place, taking advantage of LDFLAGS_STATIC that is the only bit that gets replaced for dyntest/dynbinary
This commit is contained in:
parent
45cea94a82
commit
ca405786f4
|
@ -11,5 +11,7 @@ ln -sf dockerinit-$VERSION $DEST/dockerinit
|
||||||
export DOCKER_INITSHA1="$(sha1sum $DEST/dockerinit-$VERSION | cut -d' ' -f1)"
|
export DOCKER_INITSHA1="$(sha1sum $DEST/dockerinit-$VERSION | cut -d' ' -f1)"
|
||||||
# exported so that "dyntest" can easily access it later without recalculating it
|
# exported so that "dyntest" can easily access it later without recalculating it
|
||||||
|
|
||||||
go build -o $DEST/docker-$VERSION -ldflags "$LDFLAGS -X github.com/dotcloud/docker/utils.INITSHA1 \"$DOCKER_INITSHA1\"" $BUILDFLAGS ./docker
|
(
|
||||||
echo "Created binary: $DEST/docker-$VERSION"
|
export LDFLAGS_STATIC="-X github.com/dotcloud/docker/utils.INITSHA1 \"$DOCKER_INITSHA1\""
|
||||||
|
source "$(dirname "$BASH_SOURCE")/binary"
|
||||||
|
)
|
||||||
|
|
|
@ -10,7 +10,8 @@ if [ ! -x "$INIT" ]; then
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export TEST_DOCKERINIT_PATH="$INIT"
|
(
|
||||||
|
export TEST_DOCKERINIT_PATH="$INIT"
|
||||||
LDFLAGS_STATIC="-X github.com/dotcloud/docker/utils.INITSHA1 \"$DOCKER_INITSHA1\"" \
|
export LDFLAGS_STATIC="-X github.com/dotcloud/docker/utils.INITSHA1 \"$DOCKER_INITSHA1\""
|
||||||
source "$(dirname "$BASH_SOURCE")/test"
|
source "$(dirname "$BASH_SOURCE")/test"
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue