0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-13 21:13:13 +01:00

Bake in git commit into dendritejs binary (#1048)

This commit is contained in:
Kegsay 2020-05-19 16:42:30 +01:00 committed by GitHub
parent 8b3100935c
commit 5faecdac82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

4
build-dendritejs.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash -eu
export GIT_COMMIT=$(git rev-list -1 HEAD) && \
GOOS=js GOARCH=wasm go build -ldflags "-X main.GitCommit=$GIT_COMMIT" -o main.wasm ./cmd/dendritejs

View file

@ -46,8 +46,10 @@ import (
_ "github.com/matrix-org/go-sqlite3-js" _ "github.com/matrix-org/go-sqlite3-js"
) )
var GitCommit string
func init() { func init() {
fmt.Println("dendrite.js starting...") fmt.Printf("[%s] dendrite.js starting...\n", GitCommit)
} }
const keyNameEd25519 = "_go_ed25519_key" const keyNameEd25519 = "_go_ed25519_key"