From d24b4eb376643563c9614e3d72bb79e658ae1eac Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Sat, 23 May 2020 12:03:45 +0200 Subject: [PATCH] Updated release script to produce Allegro build as well. Moved zipping directly after the build folder is ready. --- scripts/release.sh | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index b8dd295..c485930 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -12,28 +12,38 @@ echo "Creating ${version} release" rm -rf build/linux* rm -rf build/windows* -mkdir -p build/linux -mkdir -p build/windows +mkdir -p build/release go generate ../cmd/tins2020 +mkdir -p build/linux go build -tags static -ldflags "-s -w" -o build/linux/botanim ../cmd/tins2020 cp ../README.md build/linux - -CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -tags static -ldflags "-s -w" -o build/windows/botanim.exe ../cmd/tins2020 -cp ../README.md build/windows - - -mkdir -p build/release - -cd build - -cd linux +cd build/linux zip -9 -q ../release/botanim_${version}_linux_amd64.zip * echo "Created Linux release: build/release/botanim_${version}_linux_amd64.zip" -cd .. +cd ../.. -cd windows +mkdir -p build/linux-allegro +go build -tags static,allegro -ldflags "-s -w" -o build/linux-allegro/botanim ../cmd/tins2020 +cp ../README.md build/linux-allegro +cd build/linux-allegro +zip -9 -q ../release/botanim_allegro_${version}_linux_amd64.zip * +echo "Created Linux (Allegro) release: build/release/botanim_allegro_${version}_linux_amd64.zip" +cd ../.. + +mkdir -p build/windows +CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -tags static -ldflags "-s -w" -o build/windows/botanim.exe ../cmd/tins2020 +cp ../README.md build/windows +cd build/windows zip -9 -q ../release/botanim_${version}_windows_amd64.zip * echo "Created Windows release: build/release/botanim_${version}_windows_amd64.zip" -cd .. +cd ../.. + +mkdir -p build/windows-allegro +CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -tags static,allegro,mingw64_7_3 -ldflags "-s -w" -o build/windows-allegro/botanim.exe ../cmd/tins2020 +cp ../README.md build/windows-allegro +cd build/windows-allegro +zip -9 -q ../release/botanim_allegro_${version}_windows_amd64.zip * +echo "Created Windows (Allegro) release: build/release/botanim_allegro_${version}_windows_amd64.zip" +cd ../..