-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b04212
commit d44ded4
Showing
4 changed files
with
54 additions
and
14 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
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
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 |
---|---|---|
@@ -1,20 +1,39 @@ | ||
#!/bin/bash | ||
set -xeuo pipefail | ||
set -euo pipefail | ||
scriptdir="$(readlink -f $( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd ))" | ||
|
||
|
||
git describe | ||
|
||
export CGO_ENABLED=0 # For static build without 'C' | ||
|
||
go build -a | ||
|
||
test/confidence.sh | ||
function linux_compile { | ||
: "$1" # e.g. amd64 | ||
export GOOS=linux | ||
export GOARCH="$1" | ||
echo "$GOOS" "$GOARCH" | ||
rm -f frangipanni_"$GOOS"_"$GOARCH".tgz | ||
go build -a -o frangipanni_"$GOOS"_"$GOARCH" frangipanni.go | ||
tar zcf frangipanni_"$GOOS"_"$GOARCH".tgz frangipanni_"$GOOS"_"$GOARCH" *.lua | ||
} | ||
|
||
GOOS=windows GOARCH=386 go build -a -o frangipanni.exe frangipanni.go | ||
GOOS=darwin GOARCH=amd64 go build -a -o frangipanni_mac frangipanni.go | ||
function cross_compile { | ||
: "$1" # e.g. linux/amd64 | ||
export GOOS="${1%/*}" | ||
export GOARCH="${1#*/}" # This is why bash is so awful | ||
echo "$GOOS" "$GOARCH" | ||
rm -f frangipanni_"$GOOS"_"$GOARCH".zip | ||
go build -a -o frangipanni_"$GOOS"_"$GOARCH" frangipanni.go | ||
zip --quiet frangipanni_"$GOOS"_"$GOARCH".zip frangipanni_"$GOOS"_"$GOARCH" *.lua | ||
} | ||
|
||
rm -f frangipanni.zip rm -f frangipanni.tgz | ||
tar zcvf frangipanni.tgz frangipanni *.lua | ||
zip frangipanni.zip frangipanni.exe frangipanni_mac *.lua | ||
test/confidence.sh | ||
|
||
ls -ltr | ||
for arch in 386 arm64 amd64 | ||
do | ||
linux_compile $arch | ||
done | ||
for dist in windows/amd64 windows/386 darwin/amd64 freebsd/amd64 js/wasm netbsd/amd64 openbsd/amd64 | ||
do | ||
cross_compile "$dist" | ||
done |
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