mirror of https://github.com/docker/docs.git
Merge pull request #394 from ehazlett/build-enable-arch-flag
enable specifying arch along with os when building
This commit is contained in:
commit
e819eb2fc7
12
script/build
12
script/build
|
@ -2,11 +2,17 @@
|
|||
set -e
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
OS_ARCH_ARG=(-os="darwin linux windows")
|
||||
OS_PLATFORM_ARG=(-os="darwin linux windows")
|
||||
else
|
||||
OS_ARCH_ARG=($1)
|
||||
OS_PLATFORM_ARG=($1)
|
||||
fi
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
OS_ARCH_ARG=(-arch="386 amd64")
|
||||
else
|
||||
OS_ARCH_ARG=($2)
|
||||
fi
|
||||
|
||||
rm -f docker-machine*
|
||||
docker build -t docker-machine .
|
||||
exec docker run --rm -v `pwd`:/go/src/github.com/docker/machine docker-machine gox "${OS_ARCH_ARG[@]}" -output="docker-machine_{{.OS}}-{{.Arch}}"
|
||||
exec 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}}"
|
||||
|
|
Loading…
Reference in New Issue