Added release script.
This commit is contained in:
parent
ad7c149baf
commit
b68107b74a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
.vscode/launch.json
|
||||
|
||||
cmd/tins2020/*rice-box.*
|
||||
scripts/build
|
||||
|
37
scripts/release.sh
Executable file
37
scripts/release.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
version="0.0.0"
|
||||
else
|
||||
version="$1"
|
||||
fi
|
||||
|
||||
echo "Creating ${version} release"
|
||||
|
||||
rm -rf build/linux*
|
||||
rm -rf build/windows*
|
||||
|
||||
mkdir -p build/linux
|
||||
mkdir -p build/windows
|
||||
|
||||
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
|
||||
zip -9 -q ../release/botanim_${version}_linux_amd64.zip *
|
||||
echo "Created Linux release: build/release/botanim_${version}_linux_amd64.zip"
|
||||
cd ..
|
||||
|
||||
cd windows
|
||||
zip -9 -q ../release/botanim_${version}_windows_amd64.zip *
|
||||
echo "Created Windows release: build/release/botanim_${version}_windows_amd64.zip"
|
||||
cd ..
|
Loading…
Reference in New Issue
Block a user