Skip to content

Commit

Permalink
add /opt/homebrew check for arm64 Macs
Browse files Browse the repository at this point in the history
  • Loading branch information
JJTech0130 committed Jun 26, 2024
1 parent fd0dc5c commit 2d44714
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/sh
if [[ -z "$LIBRARY_PATH" && -d /opt/homebrew ]]; then
echo "Using /opt/homebrew for LIBRARY_PATH and CPATH"
export LIBRARY_PATH=/opt/homebrew/lib
export CPATH=/opt/homebrew/include
fi
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 "$@"

0 comments on commit 2d44714

Please sign in to comment.