Add environment variable option to skip docker build

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
Nathan LeClaire
2015-05-05 14:26:24 -07:00
parent 10afd2da8a
commit f1c7577f82
2 changed files with 12 additions and 1 deletions

View File

@@ -13,6 +13,11 @@ else
OS_ARCH_ARG=($2)
fi
docker build -t docker-machine .
# Build Docker image unless we opt out of it
if [[ -z "$SKIP_BUILD" ]]; then
docker build -t docker-machine .
fi
# Get rid of existing binaries
rm -f docker-machine*
docker run --rm -v `pwd`:/go/src/github.com/docker/machine docker-machine gox "${OS_PLATFORM_ARG[@]}" "${OS_ARCH_ARG[@]}" -output="docker-machine_{{.OS}}-{{.Arch}}" -ldflags="-w -X github.com/docker/machine/version.GITCOMMIT `git rev-parse --short HEAD`"