1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: fix build script to cross-compile with sqlite dependency

This commit is contained in:
Ferdinand Mütsch 2020-04-26 14:35:53 +02:00
parent 2b47a7d73f
commit 2ea9b74a0c

View File

@ -1,14 +1,8 @@
#!/bin/bash #!/bin/bash
OSLIST=( darwin linux windows ) # Requires Go and Docker to be installed
ARCHLIST=( amd64 ) # Run once initially: go get github.com/mattn/go-sqlite3
VERSION=$(cat version.txt) VERSION=$(cat version.txt)
for os in ${OSLIST[*]} xgo -targets linux/amd64,darwin/amd64,windows/amd64 -dest build -out "wakapi_$VERSION" .
do
for arch in ${ARCHLIST[*]}
do
echo "Building $os / $arch"
GOOS=$os GOARCH=$arch go build -o "build/wakapi_${VERSION}_${os}_${arch}" "github.com/muety/wakapi"
done
done