scripts: able to set XC_ARCH/OS manually

This commit is contained in:
Mitchell Hashimoto 2014-09-04 15:13:29 -07:00
parent dabbcd45a8
commit 49ac4acdd2
1 changed files with 6 additions and 6 deletions

View File

@ -15,6 +15,12 @@ cd $DIR
GIT_COMMIT=$(git rev-parse HEAD) GIT_COMMIT=$(git rev-parse HEAD)
GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "+CHANGES" || true) GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)
# If its dev mode, only build for ourself
if [ "${TF_DEV}x" != "x" ]; then
XC_OS=${XC_OS:-$(go env GOOS)}
XC_ARCH=${XC_ARCH:-$(go env GOARCH)}
fi
# Determine the arch/os combos we're building for # Determine the arch/os combos we're building for
XC_ARCH=${XC_ARCH:-"386 amd64 arm"} XC_ARCH=${XC_ARCH:-"386 amd64 arm"}
XC_OS=${XC_OS:-linux darwin windows freebsd openbsd} XC_OS=${XC_OS:-linux darwin windows freebsd openbsd}
@ -29,12 +35,6 @@ rm -f bin/*
rm -rf pkg/* rm -rf pkg/*
mkdir -p bin/ mkdir -p bin/
# If its dev mode, only build for ourself
if [ "${TF_DEV}x" != "x" ]; then
XC_OS=$(go env GOOS)
XC_ARCH=$(go env GOARCH)
fi
# Build! # Build!
echo "==> Building..." echo "==> Building..."
gox \ gox \