Skip to content

Commit

Permalink
Release script
Browse files Browse the repository at this point in the history
  • Loading branch information
greenthepear committed Sep 16, 2024
1 parent 5854bd9 commit 8a6fce5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ __*
*~
LaTeX
*.prof
record*
record*
*.zip
1 change: 1 addition & 0 deletions clean.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

# Delete records
rm -rf record_*
26 changes: 26 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
set -e

if [ $# -eq 0 ] ; then
echo "No version title provided"
exit 1
fi

echo "Compiling for Linux..."
export GOOS=linux GOARCH=amd64
go build -o Anaxim

zip_name_linux="Anaxim-$1-linux.zip"
echo "Zipping to $zip_name_linux..."
zip -r "$zip_name_linux" Anaxim Maps/

echo "Compiling for Windows..."
export GOOS=windows GOARCH=amd64 CGO_ENABLED=1
# Using zig because mingw sucks, and so does windows
export CC="zig cc -target x86_64-windows"
export CXX="zig c++ -target x86_64-windows"
go build -o Anaxim.exe

zip_name_win="Anaxim-$1-windows.zip"
echo "Zipping to $zip_name_win..."
zip -r "$zip_name_win" Anaxim.exe Maps/

0 comments on commit 8a6fce5

Please sign in to comment.