diff --git a/scripts/build.sh b/scripts/build.sh index bbb250349..d17f96dfe 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -15,6 +15,12 @@ cd $DIR GIT_COMMIT=$(git rev-parse HEAD) 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 XC_ARCH=${XC_ARCH:-"386 amd64 arm"} XC_OS=${XC_OS:-linux darwin windows freebsd openbsd} @@ -29,12 +35,6 @@ rm -f bin/* rm -rf pkg/* 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! echo "==> Building..." gox \