forked from bnb-chain/zkbnb-setup
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.sh
executable file
·38 lines (36 loc) · 873 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
for ARCH in darwin_amd64 darwin_arm64 linux_386 linux_arm64 linux_arm; do
case "$ARCH" in
darwin_amd64)
# For Intel-based MacBooks and other x86_64 machines
export GOARCH=amd64
export GOOS=darwin
;;
darwin_arm64)
# For Apple Silicon-based MacBooks and other arm64 machines
export GOARCH=arm64
export GOOS=darwin
;;
linux_386)
# For 32-bit machines
export GOARCH=386
export GOOS=linux
;;
linux_arm64)
# For other arm64 machines
export GOARCH=arm64
export GOOS=linux
;;
linux_arm)
# For other arm machines
export GOARCH=arm
export GOOS=linux
;;
*)
echo "Unsupported architecture: $ARCH"
exit 1
;;
esac
echo "Building for $ARCH..."
go build -ldflags="-w -s" -o semaphore-mtb-setup-$ARCH
done