mirror of
https://github.com/forkless/NotAlterra.git
synced 2026-08-20 01:53:35 +02:00
Simplify build script: only binaries, no archives
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# NotAlterra release build script
|
||||
# Produces: notalterra-v{version}-linux-amd64.tar.gz
|
||||
# notalterra-v{version}-windows-amd64.zip
|
||||
# NotAlterra build script
|
||||
# Produces: notalterra-linux, notalterra-windows.exe (in project root)
|
||||
|
||||
VERSION=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
|
||||
echo "=== NotAlterra v${VERSION} ==="
|
||||
@@ -34,27 +33,14 @@ if [ "$WINDOWS_SKIP" -eq 0 ]; then
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "=== Packaging release ==="
|
||||
|
||||
LINUX_ARCHIVE="notalterra-v${VERSION}-linux-amd64.tar.gz"
|
||||
cp target/release/notalterra notalterra
|
||||
tar -czf "$LINUX_ARCHIVE" notalterra
|
||||
echo "=== Copying binaries ==="
|
||||
cp target/release/notalterra notalterra-linux
|
||||
rm -f notalterra
|
||||
echo " $LINUX_ARCHIVE"
|
||||
echo " notalterra-linux ($(du -h notalterra-linux | 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
|
||||
cp target/x86_64-pc-windows-gnu/release/notalterra.exe notalterra-windows.exe
|
||||
rm -f notalterra.exe
|
||||
echo " $WIN_ARCHIVE"
|
||||
echo " notalterra-windows.exe ($(du -h notalterra-windows.exe | cut -f1))"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "=== Build complete ==="
|
||||
ls -lh "$LINUX_ARCHIVE"
|
||||
if [ "$WINDOWS_SKIP" -eq 0 ]; then
|
||||
ls -lh "$WIN_ARCHIVE"
|
||||
fi
|
||||
echo "=== Done ==="
|
||||
|
||||
Reference in New Issue
Block a user