mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-26 16:21:55 -06:00
034f5ae3f1
* Only include go-sqlite3 on the relevant binaries * The driver name is always sqlite3 now * Update to matrix-org/go-sqlite3-js@e537baa * Add initial Wasm test harness * Upgrade go-sqlite3-js This fixes an error about semicolons in single statements. * Add browser-like WebSocket API for testing * Upgrade go-sqlite3-js This upgrade includes printing panic messages next to stacks. * Run for all PRs targeting any branch * Use manual Node caching * Temporarily run for all pushes * Use npm ci instead of install * Use HTTPS auth for repo packages * Match path style from build.sh * update utp Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
25 lines
669 B
Bash
Executable file
25 lines
669 B
Bash
Executable file
#!/bin/sh -eu
|
|
|
|
# Put installed packages into ./bin
|
|
export GOBIN=$PWD/`dirname $0`/bin
|
|
|
|
if [ -d ".git" ]
|
|
then
|
|
export BUILD=`git rev-parse --short HEAD || ""`
|
|
export BRANCH=`(git symbolic-ref --short HEAD | tr -d \/ ) || ""`
|
|
if [ "$BRANCH" = master ]
|
|
then
|
|
export BRANCH=""
|
|
fi
|
|
|
|
export FLAGS="-X github.com/matrix-org/dendrite/internal.branch=$BRANCH -X github.com/matrix-org/dendrite/internal.build=$BUILD"
|
|
else
|
|
export FLAGS=""
|
|
fi
|
|
|
|
mkdir -p bin
|
|
|
|
CGO_ENABLED=1 go build -trimpath -ldflags "$FLAGS" -v -o "bin/" ./cmd/...
|
|
|
|
CGO_ENABLED=0 GOOS=js GOARCH=wasm go build -trimpath -ldflags "$FLAGS" -o bin/main.wasm ./cmd/dendritejs-pinecone
|