-
Notifications
You must be signed in to change notification settings - Fork 0
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
2c0a2b0
commit 70907af
Showing
2 changed files
with
59 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,53 @@ | ||
#!/bin/bash | ||
|
||
|
||
cd "$( dirname "$0" )" | ||
|
||
programs=$(find . -type d | tail -n +2 | grep -v "git\|releases\|bin") | ||
name="engine-utils" | ||
|
||
IFS=$'\n' | ||
for prog in $programs; do | ||
pushd $prog | ||
|
||
echo "Linux Build..." | ||
export GOOS=linux | ||
export GOARCH=amd64 | ||
arch="linux-amd64" | ||
mkdir -p ../releases/$arch | ||
go build -o ../releases/$arch/$prog . | ||
|
||
echo "Mac Build..." | ||
export GOOS=darwin | ||
export GOARCH=amd64 | ||
arch="mac-amd64" | ||
mkdir -p ../releases/$arch | ||
go build -o ../releases/$arch/$prog . | ||
|
||
echo "Windows32 Build..." | ||
export GOOS=windows | ||
export GOARCH=386 | ||
arch="windows-386" | ||
mkdir -p ../releases/$arch | ||
go build -o ../releases/$arch/$prog.exe . | ||
|
||
echo "Windows64 Build..." | ||
export GOOS=windows | ||
export GOARCH=amd64 | ||
arch="windows-amd64" | ||
mkdir -p ../releases/$arch | ||
go build -o ../releases/$arch/$prog.exe . | ||
|
||
ls *.go >/dev/null | ||
if [ "$?" -eq "0" ]; then | ||
echo "Linux Build..." | ||
export GOOS=linux | ||
export GOARCH=amd64 | ||
arch="linux-amd64" | ||
mkdir -p ../releases/${arch} | ||
go build -o ../releases/${arch}/$prog . || exit 1 | ||
|
||
echo "Mac Build..." | ||
export GOOS=darwin | ||
export GOARCH=amd64 | ||
arch="mac-amd64" | ||
mkdir -p ../releases/${arch} | ||
go build -o ../releases/${arch}/$prog . || exit 1 | ||
|
||
echo "Windows32 Build..." | ||
export GOOS=windows | ||
export GOARCH=386 | ||
arch="windows-386" | ||
mkdir -p ../releases/${arch} | ||
go build -o ../releases/${arch}/${prog}.exe . || exit 1 | ||
|
||
echo "Windows64 Build..." | ||
export GOOS=windows | ||
export GOARCH=amd64 | ||
arch="windows-amd64" | ||
mkdir -p ../releases/${arch} | ||
go build -o ../releases/${arch}/${prog}.exe . || exit 1 | ||
fi | ||
popd | ||
done | ||
done | ||
|
||
echo "Adding EPDs" | ||
ls -d releases/*/ | xargs -n 1 cp -R testsuite/epds || exit 1 | ||
|
||
cd releases | ||
echo "Compressing" | ||
zip -r "${name}-win64.zip" "windows-amd64" || exit 1 | ||
zip -r "${name}-win386.zip" "windows-386" || exit 1 | ||
tar -zcvf "${name}-mac64.tar.gz" "mac-amd64" || exit 1 | ||
tar -zcvf "${name}-linux64.tar.gz" "linux-amd64" || exit 1 |