From 98bd1099518a8453888a3aa12accbe5574e2c834 Mon Sep 17 00:00:00 2001 From: forkless Date: Mon, 1 Jun 2026 02:13:15 +0200 Subject: [PATCH] Restore archive packaging in build script --- build.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index e57562b..2f8952e 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ set -euo pipefail # NotAlterra build script -# Produces: notalterra-linux, notalterra-windows.exe (in project root) +# Produces: notalterra-linux, notalterra-windows.exe, and release archives VERSION=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/') echo "=== NotAlterra v${VERSION} ===" @@ -42,5 +42,21 @@ if [ "$WINDOWS_SKIP" -eq 0 ]; then echo " notalterra-windows.exe ($(du -h notalterra-windows.exe | cut -f1))" fi +echo "" +echo "=== Packaging release archives ===" +LINUX_ARCHIVE="notalterra-v${VERSION}-linux-amd64.tar.gz" +cp target/release/notalterra notalterra +tar -czf "$LINUX_ARCHIVE" notalterra +rm -f notalterra +echo " $LINUX_ARCHIVE ($(du -h "$LINUX_ARCHIVE" | cut -f1))" + +if [ "$WINDOWS_SKIP" -eq 0 ]; then + WIN_ARCHIVE="notalterra-v${VERSION}-windows-x64.zip" + cp target/x86_64-pc-windows-gnu/release/notalterra.exe notalterra.exe + zip -q "$WIN_ARCHIVE" notalterra.exe + rm -f notalterra.exe + echo " $WIN_ARCHIVE ($(du -h "$WIN_ARCHIVE" | cut -f1))" +fi + echo "" echo "=== Done ==="