Add Raspberry Pi binary to builds (#189)

* Add Raspberry Pi binary to builds

* Attempt to add arm cross compile to dockerfile

* WIP fix for OSX crosscompiler

* WIP docker build debug

* Fix errors building docker image
This commit is contained in:
WithoutPants
2019-11-16 09:29:45 +11:00
committed by Leopere
parent a6b8a3f2e8
commit ec2a8d0dc6
4 changed files with 27 additions and 27 deletions

View File

@@ -8,7 +8,8 @@ SETUP="export GO111MODULE=on; export CGO_ENABLED=1;"
WINDOWS="GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ packr2 build -o dist/stash-win.exe -ldflags \"-extldflags '-static' $VERSION_FLAGS\" -tags extended -v -mod=vendor;"
DARWIN="GOOS=darwin GOARCH=amd64 CC=o64-clang CXX=o64-clang++ packr2 build -o dist/stash-osx -ldflags \"$VERSION_FLAGS\" -tags extended -v -mod=vendor;"
LINUX="packr2 build -o dist/stash-linux -ldflags \"$VERSION_FLAGS\" -v -mod=vendor;"
RASPPI="GOOS=linux GOARCH=arm GOARM=5 CC=arm-linux-gnueabi-gcc packr2 build -o dist/stash-pi -ldflags \"$VERSION_FLAGS\" -v -mod=vendor;"
COMMAND="$SETUP $WINDOWS $DARWIN $LINUX"
COMMAND="$SETUP $WINDOWS $DARWIN $LINUX $RASPPI"
docker run --rm --mount type=bind,source="$(pwd)",target=/stash -w /stash stashappdev/compiler:1 /bin/bash -c "$COMMAND"
docker run --rm --mount type=bind,source="$(pwd)",target=/stash -w /stash stashappdev/compiler:2 /bin/bash -c "$COMMAND"