Skip to content

Commit

Permalink
build.sh: add build script
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Oct 14, 2024
1 parent cf56cd2 commit a4d1a7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
go generate ./web
export MAUTRIX_VERSION=$(cat go.mod | grep 'maunium.net/go/mautrix ' | head -n1 | awk '{ print $2 }')
go build -ldflags "-X main.Tag=$(git describe --exact-match --tags 2>/dev/null) -X main.Commit=$(git rev-parse HEAD) -X 'main.BuildTime=`date -Iseconds`' -X 'maunium.net/go/mautrix.GoModVersion=$MAUTRIX_VERSION'" "$@" || exit 2

0 comments on commit a4d1a7f

Please sign in to comment.