Skip to content

Commit

Permalink
Allow passing extra go build parameters to build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Mar 7, 2024
1 parent a158d42 commit d770fac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
export MAUTRIX_VERSION=$(cat go.mod | grep 'maunium.net/go/mautrix ' | awk '{ print $2 }')
export GO_LDFLAGS="-s -w -X main.Tag=$(git describe --exact-match --tags 2>/dev/null) -X main.Commit=$(git rev-parse HEAD) -X 'main.BuildTime=`date '+%b %_d %Y, %H:%M:%S'`' -X 'maunium.net/go/mautrix.GoModVersion=$MAUTRIX_VERSION'"
go build -ldflags "$GO_LDFLAGS" -o mautrix-meta
go build -ldflags "$GO_LDFLAGS" -o mautrix-meta "$@"

0 comments on commit d770fac

Please sign in to comment.