forked from DarthSim/hivemind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-all.sh
executable file
·30 lines (21 loc) · 1.73 KB
/
build-all.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
#!/bin/sh
version=$(/bin/sh -c 'git describe --always --tags --abbrev=0')
rm -rf ./dist
env CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags "-s -w -X main.version=$version" -a -installsuffix cgo -o dist/hivemind .
gzip -9 -S "-$version-linux-arm.gz" dist/hivemind
env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w -X main.version=$version" -a -installsuffix cgo -o dist/hivemind .
gzip -9 -S "-$version-linux-arm64.gz" dist/hivemind
env CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags "-s -w -X main.version=$version" -a -installsuffix cgo -o dist/hivemind .
gzip -9 -S "-$version-linux-386.gz" dist/hivemind
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -X main.version=$version" -a -installsuffix cgo -o dist/hivemind .
gzip -9 -S "-$version-linux-amd64.gz" dist/hivemind
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w -X main.version=$version" -a -installsuffix cgo -o dist/hivemind .
gzip -9 -S "-$version-macos-amd64.gz" dist/hivemind
env CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w -X main.version=$version" -a -installsuffix cgo -o dist/hivemind .
gzip -9 -S "-$version-macos-arm64.gz" dist/hivemind
env CGO_ENABLED=0 GOOS=freebsd GOARCH=arm go build -ldflags "-s -w -X main.version=$version" -a -installsuffix cgo -o dist/hivemind .
gzip -9 -S "-$version-freebsd-arm.gz" dist/hivemind
env CGO_ENABLED=0 GOOS=freebsd GOARCH=386 go build -ldflags "-s -w -X main.version=$version" -a -installsuffix cgo -o dist/hivemind .
gzip -9 -S "-$version-freebsd-386.gz" dist/hivemind
env CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags "-s -w -X main.version=$version" -a -installsuffix cgo -o dist/hivemind .
gzip -9 -S "-$version-freebsd-amd64.gz" dist/hivemind