Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2dc3079c01 | ||
|
|
bfe45df954 | ||
|
|
32a2f93484 | ||
|
|
f3263f3a03 | ||
|
|
740454d87e | ||
|
|
18a5730605 |
@@ -2,10 +2,6 @@
|
||||
|
||||
An Electron application with Vue
|
||||
|
||||
## Recommended IDE Setup
|
||||
|
||||
- [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
|
||||
|
||||
## Project Setup
|
||||
|
||||
### Install
|
||||
|
||||
@@ -71,6 +71,23 @@ const uploadFile = async (filePath, platform, version) => {
|
||||
)
|
||||
}
|
||||
|
||||
const uploadFileToRoot = async (filePath) => {
|
||||
const fileStream = fs.createReadStream(filePath)
|
||||
const fileName = path.basename(filePath)
|
||||
const key = `${fileName}`
|
||||
|
||||
console.log(`Uploading ${fileName} → ${key} (latest)`)
|
||||
|
||||
await client.send(
|
||||
new PutObjectCommand({
|
||||
Bucket: BUCKET,
|
||||
Key: key,
|
||||
Body: fileStream,
|
||||
ContentType: getContentType(fileName),
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
const main = async () => {
|
||||
const platform = process.argv[2]
|
||||
const version = process.argv[3]
|
||||
@@ -81,25 +98,25 @@ 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.')
|
||||
return
|
||||
}
|
||||
// if (isGitTagDirty()) {
|
||||
// console.log('Git working directory is dirty. Skipping upload.')
|
||||
// return
|
||||
// }
|
||||
|
||||
console.log(
|
||||
`Uploading artifacts for ${platform} v${version} (tag: ${currentTag})`,
|
||||
@@ -128,8 +145,14 @@ const main = async () => {
|
||||
|
||||
for (const file of uploadTargets) {
|
||||
const fullPath = path.join(DIST_DIR, file)
|
||||
|
||||
// Keep latest.yml up to date for platform
|
||||
if (file.startsWith('latest') && file.endsWith('.yml')) {
|
||||
await uploadFileToRoot(fullPath)
|
||||
} else {
|
||||
await uploadFile(fullPath, platform, version)
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Upload complete.')
|
||||
}
|
||||
|
||||
@@ -12,12 +12,16 @@ asarUnpack:
|
||||
- resources/**
|
||||
win:
|
||||
executableName: app.takerofnotes.com
|
||||
cscLink: C:\Users\nicwands\Desktop\takerofnotes.pfx
|
||||
cscKeyPassword: password
|
||||
nsis:
|
||||
artifactName: ${name}-${version}-setup.${ext}
|
||||
shortcutName: ${productName}
|
||||
uninstallDisplayName: ${productName}
|
||||
createDesktopShortcut: always
|
||||
mac:
|
||||
identity: '-'
|
||||
hardenedRuntime: false
|
||||
entitlementsInherit: build/entitlements.mac.plist
|
||||
extendInfo:
|
||||
- NSCameraUsageDescription: Application requests access to the device's camera.
|
||||
@@ -30,11 +34,12 @@ dmg:
|
||||
linux:
|
||||
target:
|
||||
- AppImage
|
||||
# - snap
|
||||
- deb
|
||||
maintainer: electronjs.org
|
||||
category: Utility
|
||||
appImage:
|
||||
artifactName: ${name}-${version}.${ext}
|
||||
npmRebuild: false
|
||||
publish: null
|
||||
publish:
|
||||
provider: generic
|
||||
url: https://s3.takerofnotes.com/dist
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "takerofnotes-app",
|
||||
"version": "0.2.0",
|
||||
"version": "0.3.0",
|
||||
"description": "An Electron application with Vue",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "example.com",
|
||||
|
||||
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