From bfe45df95405afa81354f89a95b6b87638292343 Mon Sep 17 00:00:00 2001 From: nicwands Date: Thu, 4 Jun 2026 15:31:35 -0400 Subject: [PATCH] test mac build --- bin/uploadArtifacts.js | 26 +++++++++--------- electron-builder.yml | 2 ++ release-mac.command | 62 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 13 deletions(-) create mode 100755 release-mac.command diff --git a/bin/uploadArtifacts.js b/bin/uploadArtifacts.js index 7445cb4..904ca1a 100644 --- a/bin/uploadArtifacts.js +++ b/bin/uploadArtifacts.js @@ -98,20 +98,20 @@ const main = async () => { process.exit(1) } - const currentTag = getCurrentTag() - if (!currentTag) { - console.log( - 'No git tag found. Skipping upload (artifacts are only uploaded on tagged commits).', - ) - return - } + // const currentTag = getCurrentTag() + // if (!currentTag) { + // console.log( + // 'No git tag found. Skipping upload (artifacts are only uploaded on tagged commits).', + // ) + // return + // } - if (currentTag !== version && !currentTag.startsWith(version)) { - console.log( - `Git tag (${currentTag}) does not match version (${version}). Skipping upload.`, - ) - return - } + // if (currentTag !== version && !currentTag.startsWith(version)) { + // console.log( + // `Git tag (${currentTag}) does not match version (${version}). Skipping upload.`, + // ) + // return + // } // if (isGitTagDirty()) { // console.log('Git working directory is dirty. Skipping upload.') diff --git a/electron-builder.yml b/electron-builder.yml index b955640..fbe2fb4 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -18,6 +18,8 @@ nsis: uninstallDisplayName: ${productName} createDesktopShortcut: always mac: + identity: '-' + hardenedRuntime: false entitlementsInherit: build/entitlements.mac.plist extendInfo: - NSCameraUsageDescription: Application requests access to the device's camera. diff --git a/release-mac.command b/release-mac.command new file mode 100755 index 0000000..c3f0c56 --- /dev/null +++ b/release-mac.command @@ -0,0 +1,62 @@ +#!/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