Add a "daemon" build tag and toggle it with the already-existing "DOCKER_CLIENTONLY" build variable

This works mostly by refactoring our "main" package to be careful about what it imports based on the daemon build tag. :)

Also, I've updated Travis to test "client-only" compilation after it tests the daemon version.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 1b95590d06b20b79041f6d23b9bc35612b82cb51
Component: engine
This commit is contained in:
Tianon Gravi
2014-08-01 11:34:06 -06:00
parent bf1d90d442
commit 309f9edb73
6 changed files with 251 additions and 187 deletions

View File

@ -90,6 +90,10 @@ if [ ! "$GOPATH" ]; then
exit 1
fi
if [ -z "$DOCKER_CLIENTONLY" ]; then
DOCKER_BUILDTAGS+=" daemon"
fi
# Use these flags when compiling the tests and final binary
LDFLAGS='
-w