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
Upstream-commit: ca405786f468a18859684dc13d43a293d47b89bd Component: engine
This commit is contained in:
@ -11,5 +11,7 @@ ln -sf dockerinit-$VERSION $DEST/dockerinit
|
||||
export DOCKER_INITSHA1="$(sha1sum $DEST/dockerinit-$VERSION | cut -d' ' -f1)"
|
||||
# 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
|
||||
fi
|
||||
|
||||
export TEST_DOCKERINIT_PATH="$INIT"
|
||||
|
||||
LDFLAGS_STATIC="-X github.com/dotcloud/docker/utils.INITSHA1 \"$DOCKER_INITSHA1\"" \
|
||||
(
|
||||
export TEST_DOCKERINIT_PATH="$INIT"
|
||||
export LDFLAGS_STATIC="-X github.com/dotcloud/docker/utils.INITSHA1 \"$DOCKER_INITSHA1\""
|
||||
source "$(dirname "$BASH_SOURCE")/test"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user