AppImage release / appimage (push) Successful in 53s
Drag Baroque charts onto a line, reorder them, set a duration, or remove a note. The AppImage no longer packages oemer, ONNX, or the models. Version 0.2.0. Co-authored-by: catpersonisme <catpersonisme@gmail.com>
35 lines
963 B
Bash
Executable File
35 lines
963 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# One-command AppImage of the fingering editor. No Python, oemer, or ONNX models.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
ROOT="$(pwd)"
|
|
|
|
echo "== Install Node packages =="
|
|
npm install
|
|
|
|
if [[ ! -f "$ROOT/electron/icon.png" ]]; then
|
|
echo "electron/icon.png is missing." >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "== Build the Next.js server =="
|
|
npm run build
|
|
rm -rf .next/standalone/public .next/standalone/.next/static
|
|
mkdir -p .next/standalone/.next
|
|
cp -a public .next/standalone/public
|
|
cp -a .next/static .next/standalone/.next/static
|
|
|
|
echo "== Package the AppImage =="
|
|
export CSC_IDENTITY_AUTO_DISCOVERY=false
|
|
npx electron-builder --linux AppImage
|
|
|
|
APPIMAGE="$(find dist -maxdepth 1 -name '*.AppImage' -printf '%T@ %p\n' | sort -nr | head -1 | cut -d' ' -f2-)"
|
|
chmod +x "$APPIMAGE"
|
|
SIZE="$(stat -c%s "$APPIMAGE")"
|
|
echo "Built $APPIMAGE ($SIZE bytes)"
|
|
LIMIT=$((600 * 1024 * 1024))
|
|
if (( SIZE > LIMIT )); then
|
|
echo "AppImage is over 600MB." >&2
|
|
exit 1
|
|
fi
|