diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-09-02 16:18:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-02 16:18:08 +0100 |
commit | 3b0774805cd06e1d9094a5b0773126cbfb573abb (patch) | |
tree | a3eb2fdaa28c8f88ace5294743910eddac74964f /build.sh | |
parent | 096191ca240776031370e99b93732557972ba92a (diff) |
Version imprint (#1383)
* Versions
* Update build.sh
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -3,6 +3,11 @@ # Put installed packages into ./bin export GOBIN=$PWD/`dirname $0`/bin -go install -v $PWD/`dirname $0`/cmd/... +export BRANCH=`(git symbolic-ref --short HEAD | cut -d'/' -f 3 )|| ""` +export BUILD=`git rev-parse --short HEAD || ""` -GOOS=js GOARCH=wasm go build -o main.wasm ./cmd/dendritejs +export FLAGS="-X github.com/matrix-org/dendrite/internal.branch=$BRANCH -X github.com/matrix-org/dendrite/internal.build=$BUILD" + +go install -trimpath -ldflags "$FLAGS" -v $PWD/`dirname $0`/cmd/... + +GOOS=js GOARCH=wasm go build -trimpath -ldflags "$FLAGS" -o main.wasm ./cmd/dendritejs |