Skip to content

Commit

Permalink
Add raspberry pi build
Browse files Browse the repository at this point in the history
  • Loading branch information
prasmussen committed Feb 22, 2016
1 parent a7256ab commit cabd732
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions _release/build-all.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/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"
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 linux/rpi netbsd/386 netbsd/amd64 netbsd/arm openbsd/386 openbsd/amd64 openbsd/arm plan9/386 plan9/amd64 solaris/amd64 windows/386 windows/amd64"

BIN_PATH="_release/bin"

Expand All @@ -19,8 +19,16 @@ 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

export GOOS=$GOOS
export GOARCH=$GOARCH go build
export GOARCH=$GOARCH

echo "Building $BIN_NAME"
go build -ldflags '-w -s' -o ${BIN_PATH}/${BIN_NAME}
Expand Down

0 comments on commit cabd732

Please sign in to comment.