-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathbuildBinaries.sh
executable file
·46 lines (37 loc) · 1022 Bytes
/
buildBinaries.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
39
40
41
42
43
44
45
46
#!/bin/bash
version=1.1.4
mkdir build/
rm build/*
# Windows amd64
goos=windows
goarch=amd64
GOOS=$goos GOARCH=$goarch go build -o tinja.exe
zip build/TInjA_"$version"_"$goos"_"$goarch".zip tinja.exe
# Linux amd64
goos=linux
goarch=amd64
GOOS=$goos GOARCH=$goarch go build -o tinja
tar cfvz build/TInjA_"$version"_"$goos"_"$goarch".tar.gz tinja
# Linux arm64
goos=linux
goarch=arm64
GOOS=$goos GOARCH=$goarch go build -o tinja
tar cfvz build/TInjA_"$version"_"$goos"_"$goarch".tar.gz tinja
# Darwin/MacOS amd64
goos=darwin
goarch=amd64
GOOS=$goos GOARCH=$goarch go build -o tinja
tar cfvz build/TInjA_"$version"_"$goos"_"$goarch".tar.gz tinja
# Darwin/MacOS arm64
goos=darwin
goarch=arm64
GOOS=$goos GOARCH=$goarch go build -o tinja
tar cfvz build/TInjA_"$version"_"$goos"_"$goarch".tar.gz tinja
# reset
GOOS=
GOARCH=
# remove binaries
rm tinja
rm tinja.exe
# generate checksum file
find build/ -type f \( -iname "*.tar.gz" -or -iname "*.zip" \) -exec sha256sum {} + > build/TInjA_"$version"_checksums_sha256.txt