forked from ouqiang/delay-queue
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
15 lines (15 loc) · 699 Bytes
/
build.sh
File metadata and controls
15 lines (15 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mkdir -p dist
if [[ `uname -s` == "Darwin" ]]; then
echo "system is macos"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags '-w' -o dist/delay-queue-linux-64
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags '-w' -o dist/delay-queue-win-64
go build -ldflags '-w' -o dist/delay-queue-macos-64
else
echo "system is linux"
CGO_ENABLED=0 GOOS=macos GOARCH=amd64 go build -ldflags '-w' -o dist/delay-queue-linux-64
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags '-w' -o dist/delay-queue-win-64
go build -ldflags '-w' -o dist/delay-queue-macos-64
fi
upx -9 dist/delay-queue-linux-64
upx -9 dist/delay-queue-win-64
upx -9 dist/delay-queue-macos-64