Merge pull request #1884 from hashicorp/sethvargo/build_args

Simplify xc script
This commit is contained in:
Seth Vargo 2016-10-27 22:15:55 -04:00 committed by GitHub
commit de8188ea80
1 changed files with 7 additions and 7 deletions

View File

@ -16,8 +16,12 @@ GIT_COMMIT="$(git rev-parse HEAD)"
GIT_DIRTY="$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)"
# Determine the arch/os combos we're building for
XC_ARCH=${XC_ARCH:-"386 amd64"}
XC_OS=${XC_OS:-linux}
# XC_ARCH=${XC_ARCH:-"386 amd64"}
# XC_OS=${XC_OS:-linux}
XC_ARCH=${XC_ARCH:-"386 amd64 arm"}
XC_OS=${XC_OS:-"darwin linux windows"}
XC_EXCLUDE=${XC_EXCLUDE:-"!darwin/arm !darwin/386"}
# Delete the old dir
echo "==> Removing old directory..."
@ -35,13 +39,9 @@ fi
echo "==> Building..."
gox \
-os="${XC_OS}" \
-os="!dragonfly" \
-os="!netbsd" \
-os="!openbsd" \
-os="!solaris" \
-arch="${XC_ARCH}" \
-osarch="${XC_EXCLUDE}" \
-cgo \
-osarch="!darwin/386" \
-ldflags "-X main.GitCommit='${GIT_COMMIT}${GIT_DIRTY}'" \
-output "pkg/{{.OS}}_{{.Arch}}/nomad" \
.