Update build script to set env vars correctly for dendritejs

This commit is contained in:
Kegan Dougal 2020-03-05 15:54:08 +00:00
parent a7d50a7ceb
commit 086b9164f5

View file

@ -1,3 +1,10 @@
#!/bin/sh
#!/bin/bash -eu
GOBIN=$PWD/`dirname $0`/bin go install -v $PWD/`dirname $0`/cmd/...
# Put installed packages into ./bin
export GOBIN=$PWD/`dirname $0`/bin
# We can't build all packages ala ./cmd/... because ./cmd/dendritejs only works for WASM
find ./cmd -mindepth 1 -maxdepth 1 -type d | grep -v dendritejs | xargs go install -v
# worth compiling it to make sure it's happy though, and who knows maybe they do want to build for wasm ;)
GOOS=js GOARCH=wasm go build -o dendritejs.wasm $PWD/`dirname $0`/cmd/dendritejs