63 lines
1.5 KiB
Bash
Executable File
63 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Taker of Notes — macOS Release Script
|
|
# Double-click this file in Finder to run it.
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
cd "$SCRIPT_DIR"
|
|
|
|
echo "============================================"
|
|
echo " Taker of Notes — macOS Release"
|
|
echo "============================================"
|
|
echo ""
|
|
|
|
# ── 1. Git pull ──
|
|
echo "[1/3] Pulling latest code from git..."
|
|
echo ""
|
|
if git pull; then
|
|
echo ""
|
|
echo " ✅ Git pull successful."
|
|
else
|
|
echo ""
|
|
echo " ❌ Git pull failed. Check your network or git status."
|
|
echo " (If you have uncommitted changes, commit or stash them first.)"
|
|
exit 1
|
|
fi
|
|
echo ""
|
|
|
|
# ── 2. Build for macOS ──
|
|
echo "[2/3] Building the application for macOS..."
|
|
echo " This will compile the app and create a .dmg/.zip."
|
|
echo ""
|
|
if npm run build:mac; then
|
|
echo ""
|
|
echo " ✅ Build successful."
|
|
else
|
|
echo ""
|
|
echo " ❌ Build failed. Check the error messages above."
|
|
exit 1
|
|
fi
|
|
echo ""
|
|
|
|
# ── 3. Release (upload artifacts) ──
|
|
echo "[3/3] Uploading release artifacts..."
|
|
echo ""
|
|
if npm run release:mac; then
|
|
echo ""
|
|
echo " ✅ Release uploaded successfully."
|
|
else
|
|
echo ""
|
|
echo " ❌ Release upload failed. Check the error messages above."
|
|
exit 1
|
|
fi
|
|
echo ""
|
|
|
|
echo "============================================"
|
|
echo " 🎉 macOS release complete!"
|
|
echo "============================================"
|
|
echo ""
|
|
echo "Press Enter to close this window."
|
|
read -r
|