aboutsummaryrefslogtreecommitdiffstats
path: root/_release/build-all.sh
diff options
context:
space:
mode:
Diffstat (limited to '_release/build-all.sh')
-rwxr-xr-x_release/build-all.sh29
1 files changed, 7 insertions, 22 deletions
diff --git a/_release/build-all.sh b/_release/build-all.sh
index 414ae18..7f05036 100755
--- a/_release/build-all.sh
+++ b/_release/build-all.sh
@@ -1,18 +1,15 @@
#!/bin/bash
-# Load crosscompile environment
-source _release/crosscompile.bash
+APP_NAME="gdrive"
+PLATFORMS="darwin/386 darwin/amd64 darwin/arm darwin/arm64 dragonfly/amd64 freebsd/386 freebsd/amd64 freebsd/arm linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64 linux/ppc64le linux/mips64 linux/mips64le netbsd/386 netbsd/amd64 netbsd/arm openbsd/386 openbsd/amd64 openbsd/arm plan9/386 plan9/amd64 solaris/amd64 windows/386 windows/amd64"
-APP_NAME="drive"
-PLATFORMS="darwin/386 darwin/amd64 freebsd/386 freebsd/amd64 linux/386 linux/amd64 linux/arm linux/rpi windows/386 windows/amd64"
BIN_PATH="_release/bin"
# Initialize bin dir
mkdir -p $BIN_PATH
-rm $BIN_PATH/*
+rm $BIN_PATH/* 2> /dev/null
-
-# Build binary for each platform in parallel
+# Build binary for each platform
for PLATFORM in $PLATFORMS; do
GOOS=${PLATFORM%/*}
GOARCH=${PLATFORM#*/}
@@ -22,23 +19,11 @@ for PLATFORM in $PLATFORMS; do
BIN_NAME="${BIN_NAME}.exe"
fi
- # Raspberrypi seems to need arm5 binaries
- if [ $GOARCH == "rpi" ]; then
- export GOARM=5
- GOARCH="arm"
- else
- unset GOARM
- fi
-
- BUILD_CMD="go-${GOOS}-${GOARCH} build -ldflags '-w' -o ${BIN_PATH}/${BIN_NAME} $APP_NAME.go"
+ export GOOS=$GOOS
+ export GOARCH=$GOARCH go build
echo "Building $BIN_NAME"
- $BUILD_CMD &
-done
-
-# Wait for builds to complete
-for job in $(jobs -p); do
- wait $job
+ go build -ldflags '-w -s' -o ${BIN_PATH}/${BIN_NAME}
done
echo "All done"