forked from DarthSim/overmind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-all.sh
executable file
·34 lines (24 loc) · 1.45 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
31
32
33
34
#!/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" -a -o dist/overmind .
gzip -9 -S "-$version-linux-arm.gz" dist/overmind
env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -a -o dist/overmind .
gzip -9 -S "-$version-linux-arm64.gz" dist/overmind
env CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags "-s -w" -a -o dist/overmind .
gzip -9 -S "-$version-linux-386.gz" dist/overmind
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -a -o dist/overmind .
gzip -9 -S "-$version-linux-amd64.gz" dist/overmind
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -a -o dist/overmind .
gzip -9 -S "-$version-macos-amd64.gz" dist/overmind
env CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w" -a -o dist/overmind .
gzip -9 -S "-$version-macos-arm64.gz" dist/overmind
env CGO_ENABLED=0 GOOS=freebsd GOARCH=arm go build -ldflags "-s -w" -a -o dist/overmind .
gzip -9 -S "-$version-freebsd-arm.gz" dist/overmind
env CGO_ENABLED=0 GOOS=freebsd GOARCH=386 go build -ldflags "-s -w" -a -o dist/overmind .
gzip -9 -S "-$version-freebsd-386.gz" dist/overmind
env CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags "-s -w" -a -o dist/overmind .
gzip -9 -S "-$version-freebsd-amd64.gz" dist/overmind
for filename in dist/*.gz; do
sha256sum -bz $filename | awk '{printf "%s",$1}' > "$filename.sha256sum"
done