Merge pull request #1884 from hashicorp/sethvargo/build_args
Simplify xc script
This commit is contained in:
commit
de8188ea80
|
@ -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" \
|
||||
.
|
||||
|
|
Loading…
Reference in New Issue