-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add script to compile the binaries for a release
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |