Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2dc3079c01 | ||
|
|
bfe45df954 | ||
|
|
32a2f93484 | ||
|
|
f3263f3a03 |
@@ -71,10 +71,10 @@ const uploadFile = async (filePath, platform, version) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const uploadFileToRoot = async (filePath, platform) => {
|
const uploadFileToRoot = async (filePath) => {
|
||||||
const fileStream = fs.createReadStream(filePath)
|
const fileStream = fs.createReadStream(filePath)
|
||||||
const fileName = path.basename(filePath)
|
const fileName = path.basename(filePath)
|
||||||
const key = `${platform}/${fileName}`
|
const key = `${fileName}`
|
||||||
|
|
||||||
console.log(`Uploading ${fileName} → ${key} (latest)`)
|
console.log(`Uploading ${fileName} → ${key} (latest)`)
|
||||||
|
|
||||||
@@ -98,25 +98,25 @@ const main = async () => {
|
|||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentTag = getCurrentTag()
|
// const currentTag = getCurrentTag()
|
||||||
if (!currentTag) {
|
// if (!currentTag) {
|
||||||
console.log(
|
// console.log(
|
||||||
'No git tag found. Skipping upload (artifacts are only uploaded on tagged commits).',
|
// 'No git tag found. Skipping upload (artifacts are only uploaded on tagged commits).',
|
||||||
)
|
// )
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (currentTag !== version && !currentTag.startsWith(version)) {
|
// if (currentTag !== version && !currentTag.startsWith(version)) {
|
||||||
console.log(
|
// console.log(
|
||||||
`Git tag (${currentTag}) does not match version (${version}). Skipping upload.`,
|
// `Git tag (${currentTag}) does not match version (${version}). Skipping upload.`,
|
||||||
)
|
// )
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (isGitTagDirty()) {
|
// if (isGitTagDirty()) {
|
||||||
console.log('Git working directory is dirty. Skipping upload.')
|
// console.log('Git working directory is dirty. Skipping upload.')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`Uploading artifacts for ${platform} v${version} (tag: ${currentTag})`,
|
`Uploading artifacts for ${platform} v${version} (tag: ${currentTag})`,
|
||||||
@@ -148,7 +148,7 @@ const main = async () => {
|
|||||||
|
|
||||||
// Keep latest.yml up to date for platform
|
// Keep latest.yml up to date for platform
|
||||||
if (file.startsWith('latest') && file.endsWith('.yml')) {
|
if (file.startsWith('latest') && file.endsWith('.yml')) {
|
||||||
await uploadFileToRoot(fullPath, platform)
|
await uploadFileToRoot(fullPath)
|
||||||
} else {
|
} else {
|
||||||
await uploadFile(fullPath, platform, version)
|
await uploadFile(fullPath, platform, version)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,12 +12,16 @@ asarUnpack:
|
|||||||
- resources/**
|
- resources/**
|
||||||
win:
|
win:
|
||||||
executableName: app.takerofnotes.com
|
executableName: app.takerofnotes.com
|
||||||
|
cscLink: C:\Users\nicwands\Desktop\takerofnotes.pfx
|
||||||
|
cscKeyPassword: password
|
||||||
nsis:
|
nsis:
|
||||||
artifactName: ${name}-${version}-setup.${ext}
|
artifactName: ${name}-${version}-setup.${ext}
|
||||||
shortcutName: ${productName}
|
shortcutName: ${productName}
|
||||||
uninstallDisplayName: ${productName}
|
uninstallDisplayName: ${productName}
|
||||||
createDesktopShortcut: always
|
createDesktopShortcut: always
|
||||||
mac:
|
mac:
|
||||||
|
identity: '-'
|
||||||
|
hardenedRuntime: false
|
||||||
entitlementsInherit: build/entitlements.mac.plist
|
entitlementsInherit: build/entitlements.mac.plist
|
||||||
extendInfo:
|
extendInfo:
|
||||||
- NSCameraUsageDescription: Application requests access to the device's camera.
|
- NSCameraUsageDescription: Application requests access to the device's camera.
|
||||||
|
|||||||
62
release-mac.command
Executable file
62
release-mac.command
Executable file
@@ -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
|
||||||
Reference in New Issue
Block a user