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
2 changed files with 8 additions and 5 deletions
|
@ -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"
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue