Ora / tools /make-release.sh
umer-wasim's picture
Developer handover: tools/, .gitignore, README-DEVELOPERS for a new computer
c523d5c verified
Raw History Blame Contribute Delete
1.46 kB
#!/bin/bash
# Builds Ora for macOS (universal zip), Windows (NSIS) and Linux (AppImage + deb) and writes release/<version>/ with
# SHA256SUMS and latest.json, ready for:
# hf upload Devseis/ora-releases release/<version> releases --repo-type dataset
# (Ora 0.5 and later live in the dataset's releases/ folder; its root keeps Ora 0.1–0.4, the video app.)
set -euo pipefail
cd "$(dirname "$0")/../app"
VERSION=$(node -p "require('./package.json').version")
OUT="../release/$VERSION"
npm test
rm -rf dist
npm run dist
npm run dist:win
npm run dist:linux
rm -rf "$OUT"; mkdir -p "$OUT"
cp "dist/Ora-$VERSION-mac-universal.zip" "dist/Ora-$VERSION-windows-x64-setup.exe" \
"dist/Ora-$VERSION-linux-x86_64.AppImage" "dist/Ora-$VERSION-linux-x86_64.deb" "$OUT/"
cd "$OUT"
shasum -a 256 Ora-* > SHA256SUMS
size() { stat -f %z "$1"; }
cat > latest.json <<JSON
{
"version": "$VERSION",
"date": "$(date -u +%Y-%m-%d)",
"files": {
"mac": { "file": "Ora-$VERSION-mac-universal.zip", "bytes": $(size "Ora-$VERSION-mac-universal.zip") },
"windows": { "file": "Ora-$VERSION-windows-x64-setup.exe", "bytes": $(size "Ora-$VERSION-windows-x64-setup.exe") },
"linux_appimage": { "file": "Ora-$VERSION-linux-x86_64.AppImage", "bytes": $(size "Ora-$VERSION-linux-x86_64.AppImage") },
"linux_deb": { "file": "Ora-$VERSION-linux-x86_64.deb", "bytes": $(size "Ora-$VERSION-linux-x86_64.deb") }
}
}
JSON
cat SHA256SUMS
echo "release ready in $(pwd)"