forked from Hackmanit/TInjA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildBinaries.sh
55 lines (45 loc) · 1.27 KB
/
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
47
48
49
50
51
52
53
54
55
#!/bin/bash
version=1.0.5
# 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
# FreeBSD amd64
goos=freebsd
goarch=amd64
GOOS=$goos GOARCH=$goarch go build -o tinja
tar cfvz build/TInjA_"$version"_"$goos"_"$goarch".tar.gz tinja
# OpenBSD amd64
goos=openbsd
goarch=amd64
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