Skip to content

Commit 82ae6ee

Browse files
committed
Simplify our release page.
1 parent e1c6991 commit 82ae6ee

2 files changed

Lines changed: 48 additions & 79 deletions

File tree

docs/specs/deploy.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Every release produces three artifact groups under one version and changelog:
77
| Artifact | Format | Destination |
88
|----------|--------|-------------|
99
| VSCode extension | `.vsix` | VS Code Marketplace + OpenVSX |
10-
| Standalone (Windows) | NSIS `.exe` installer | GitHub Release + Tauri updater |
11-
| Standalone (macOS, Apple Silicon) | `.dmg` (install) + `.tar.gz` (update) | GitHub Release + Tauri updater |
12-
| Standalone (Linux) | AppImage | GitHub Release + Tauri updater |
10+
| Standalone (Windows) | `.nsis.zip` (contains NSIS installer) | GitHub Release + Tauri updater |
11+
| Standalone (macOS, Apple Silicon) | `.tar.gz` (contains signed `.app`) | GitHub Release + Tauri updater |
12+
| Standalone (Linux) | `.AppImage.tar.gz` (contains AppImage) | GitHub Release + Tauri updater |
1313

1414
## Release checklist
1515

@@ -33,8 +33,8 @@ Human-driven steps, in order:
3333
8. **Deploy website** — commit the updated `website/public/standalone-latest.json` and deploy mouseterm.com so the updater endpoint is live.
3434
9. **Verify the release**
3535
- Check GitHub Release assets are correct
36-
- On a Mac: download the `.dmg`, open it, confirm no Gatekeeper warnings
37-
- On Windows: download the `.exe` installer, confirm no SmartScreen warnings
36+
- On a Mac: extract the `.tar.gz`, open the `.app`, confirm no Gatekeeper warnings
37+
- On Windows: extract the `.nsis.zip`, run the installer, confirm no SmartScreen warnings
3838
- Confirm Tauri auto-updater picks up the new version (test from a previous version)
3939
- Confirm VSCode extension is live on Marketplace and OpenVSX
4040

@@ -193,7 +193,7 @@ codesign/jsign the executable
193193
- Build the update manifest JSON (see below) with the `.sig` contents inline
194194
6. **Create GitHub Release**
195195
- `gh release create v0.1.0 --title "v0.1.0" --notes-file CHANGELOG.md`
196-
- Upload: signed installers (`.dmg`, `.exe`, `.AppImage`) + update bundles (`.tar.gz`, `.nsis.zip`)
196+
- Upload: update bundles (`.tar.gz`, `.nsis.zip`, `.AppImage.tar.gz`)
197197
7. **Verify** — spot-check signatures, confirm release assets are correct
198198
199199
### Resuming after failure
@@ -211,21 +211,18 @@ All release assets use **stable filenames** (no version in the name). This allow
211211

212212
| Asset | Filename | Purpose |
213213
|-------|----------|---------|
214-
| Windows installer | `MouseTerm-windows-x64.exe` | Direct download |
215-
| Windows update bundle | `MouseTerm-windows-x64.nsis.zip` | Tauri updater |
216-
| macOS installer | `MouseTerm-macos-aarch64.dmg` | Direct download |
217-
| macOS update bundle | `MouseTerm-macos-aarch64.tar.gz` | Tauri updater |
218-
| Linux AppImage | `MouseTerm-linux-x86_64.AppImage` | Direct download |
219-
| Linux update bundle | `MouseTerm-linux-x86_64.AppImage.tar.gz` | Tauri updater |
214+
| Windows | `MouseTerm-windows-x64.nsis.zip` | Download + Tauri updater |
215+
| macOS | `MouseTerm-macos-aarch64.tar.gz` | Download + Tauri updater |
216+
| Linux | `MouseTerm-linux-x86_64.AppImage.tar.gz` | Download + Tauri updater |
220217

221218
### Download hotlinks
222219

223220
The mouseterm.com download page can link directly to the latest release with no server-side logic:
224221

225222
```
226-
https://github.com/diffplug/mouseterm/releases/latest/download/MouseTerm-windows-x64.exe
227-
https://github.com/diffplug/mouseterm/releases/latest/download/MouseTerm-macos-aarch64.dmg
228-
https://github.com/diffplug/mouseterm/releases/latest/download/MouseTerm-linux-x86_64.AppImage
223+
https://github.com/diffplug/mouseterm/releases/latest/download/MouseTerm-windows-x64.nsis.zip
224+
https://github.com/diffplug/mouseterm/releases/latest/download/MouseTerm-macos-aarch64.tar.gz
225+
https://github.com/diffplug/mouseterm/releases/latest/download/MouseTerm-linux-x86_64.AppImage.tar.gz
229226
```
230227

231228
These can later be migrated to `mouseterm.com/download/...` URLs backed by Cloudflare R2 (for analytics) without changing anything in the app — only the website links and the updater endpoint URL in `tauri.conf.json` would change.

scripts/sign-and-deploy.sh

Lines changed: 36 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,10 @@ TSA_URL="http://ts.ssl.com"
4545
# GitHub repo
4646
GITHUB_REPO="diffplug/mouseterm"
4747

48-
# Stable filenames for release assets
49-
FNAME_WIN_EXE="MouseTerm-windows-x64.exe"
50-
FNAME_WIN_UPDATE="MouseTerm-windows-x64.nsis.zip"
51-
FNAME_MAC_DMG="MouseTerm-macos-aarch64.dmg"
52-
FNAME_MAC_UPDATE="MouseTerm-macos-aarch64.tar.gz"
53-
FNAME_LINUX_APPIMAGE="MouseTerm-linux-x86_64.AppImage"
54-
FNAME_LINUX_UPDATE="MouseTerm-linux-x86_64.AppImage.tar.gz"
48+
# Stable filenames for release assets (update bundles only)
49+
FNAME_WIN="MouseTerm-windows-x64.nsis.zip"
50+
FNAME_MAC="MouseTerm-macos-aarch64.tar.gz"
51+
FNAME_LINUX="MouseTerm-linux-x86_64.AppImage.tar.gz"
5552

5653
# =============================================================================
5754
# Helper Functions
@@ -447,18 +444,8 @@ notarize_macos() {
447444
local app_name
448445
app_name=$(basename "$app")
449446

450-
log "Creating $FNAME_MAC_DMG..."
451-
local dmg_stage="$SIGN_DIR/dmg-stage"
452-
rm -rf "$dmg_stage"
453-
mkdir -p "$dmg_stage"
454-
cp -R "$app" "$dmg_stage/"
455-
ln -s /Applications "$dmg_stage/Applications"
456-
hdiutil create -volname "MouseTerm" -srcfolder "$dmg_stage" \
457-
-ov -format UDZO "$SIGN_DIR/$FNAME_MAC_DMG"
458-
rm -rf "$dmg_stage"
459-
460-
log "Creating $FNAME_MAC_UPDATE..."
461-
tar -czf "$SIGN_DIR/$FNAME_MAC_UPDATE" -C "$(dirname "$app")" "$app_name"
447+
log "Creating $FNAME_MAC..."
448+
tar -czf "$SIGN_DIR/$FNAME_MAC" -C "$(dirname "$app")" "$app_name"
462449
fi
463450

464451
log "All macOS notarization and packaging complete"
@@ -503,8 +490,6 @@ sign_windows() {
503490
--tsmode RFC3161 \
504491
"$installer_path"
505492

506-
# Copy with stable filename
507-
cp "$installer_path" "$SIGN_DIR/$FNAME_WIN_EXE"
508493
fi
509494

510495
log "Windows signing complete"
@@ -524,55 +509,42 @@ sign_updates() {
524509
local release_dir="$WORK_DIR/release-assets"
525510
mkdir -p "$release_dir"
526511

527-
# Collect and rename update bundles with stable filenames
528-
# macOS .tar.gz (already created by notarize step)
529-
[[ -f "$SIGN_DIR/$FNAME_MAC_UPDATE" ]] && cp "$SIGN_DIR/$FNAME_MAC_UPDATE" "$release_dir/"
530-
[[ -f "$SIGN_DIR/$FNAME_MAC_DMG" ]] && cp "$SIGN_DIR/$FNAME_MAC_DMG" "$release_dir/"
512+
# Collect update bundles with stable filenames
513+
# macOS .tar.gz (created by notarize step from signed+notarized .app)
514+
[[ -f "$SIGN_DIR/$FNAME_MAC" ]] && cp "$SIGN_DIR/$FNAME_MAC" "$release_dir/"
531515

532-
# Windows NSIS zip — rebuild with signed exe so Tauri auto-update gets the signed binary
516+
# Windows NSIS zip — rebuild with signed installer
533517
local win_nsis
534518
win_nsis=$(find "$SIGN_DIR/standalone-win-x64" -path "*/updater-bundles/*.nsis.zip" -o -name "*.nsis.zip" | head -1)
535519
if [[ -n "$win_nsis" ]]; then
536-
local signed_exe
537-
signed_exe=$(find "$SIGN_DIR/standalone-win-x64" -name "MouseTerm.exe" -not -name "*setup*" -not -name "*install*" | head -1)
538-
if [[ -n "$signed_exe" ]]; then
539-
log "Rebuilding NSIS zip with signed executable..."
540-
local nsis_tmp="$SIGN_DIR/nsis-repack"
541-
mkdir -p "$nsis_tmp"
542-
unzip -o "$win_nsis" -d "$nsis_tmp"
543-
# Replace the unsigned exe inside the extracted zip with the signed one
544-
local inner_exe
545-
inner_exe=$(find "$nsis_tmp" -name "MouseTerm.exe" -not -name "*setup*" -not -name "*install*" | head -1)
546-
if [[ -n "$inner_exe" ]]; then
547-
cp "$signed_exe" "$inner_exe"
548-
# Rebuild the zip
549-
(cd "$nsis_tmp" && zip -r "$release_dir/$FNAME_WIN_UPDATE" .)
550-
else
551-
warn "Could not find exe inside NSIS zip; copying original"
552-
cp "$win_nsis" "$release_dir/$FNAME_WIN_UPDATE"
520+
log "Rebuilding NSIS zip with signed installer..."
521+
local signed_installer="$SIGN_DIR/standalone-win-x64/bundle/nsis/"
522+
local nsis_tmp="$SIGN_DIR/nsis-repack"
523+
mkdir -p "$nsis_tmp"
524+
unzip -o "$win_nsis" -d "$nsis_tmp"
525+
# Find the signed installer and replace the one in the zip
526+
local signed_setup
527+
signed_setup=$(find "$SIGN_DIR/standalone-win-x64" -name "*setup*.exe" | head -1)
528+
if [[ -n "$signed_setup" ]]; then
529+
local inner_setup
530+
inner_setup=$(find "$nsis_tmp" -name "*setup*.exe" | head -1)
531+
if [[ -n "$inner_setup" ]]; then
532+
cp "$signed_setup" "$inner_setup"
553533
fi
554-
rm -rf "$nsis_tmp"
555-
else
556-
cp "$win_nsis" "$release_dir/$FNAME_WIN_UPDATE"
557534
fi
535+
(cd "$nsis_tmp" && zip -r "$release_dir/$FNAME_WIN" .)
536+
rm -rf "$nsis_tmp"
558537
fi
559538

560-
# Windows installer
561-
[[ -f "$SIGN_DIR/$FNAME_WIN_EXE" ]] && cp "$SIGN_DIR/$FNAME_WIN_EXE" "$release_dir/"
562-
563-
# Linux AppImage
564-
local linux_appimage
565-
linux_appimage=$(find "$SIGN_DIR/standalone-linux-x64" -name "*.AppImage" -not -name "*.tar.gz" | head -1)
566-
[[ -n "$linux_appimage" ]] && cp "$linux_appimage" "$release_dir/$FNAME_LINUX_APPIMAGE"
567-
539+
# Linux AppImage.tar.gz
568540
local linux_update
569541
linux_update=$(find "$SIGN_DIR/standalone-linux-x64" -path "*/updater-bundles/*.AppImage.tar.gz" -o -name "*.AppImage.tar.gz" | head -1)
570-
[[ -n "$linux_update" ]] && cp "$linux_update" "$release_dir/$FNAME_LINUX_UPDATE"
542+
[[ -n "$linux_update" ]] && cp "$linux_update" "$release_dir/$FNAME_LINUX"
571543

572544
# Generate .sig files for update bundles using Tauri CLI
573-
for bundle in "$release_dir/$FNAME_MAC_UPDATE" \
574-
"$release_dir/$FNAME_WIN_UPDATE" \
575-
"$release_dir/$FNAME_LINUX_UPDATE"; do
545+
for bundle in "$release_dir/$FNAME_MAC" \
546+
"$release_dir/$FNAME_WIN" \
547+
"$release_dir/$FNAME_LINUX"; do
576548
if [[ -f "$bundle" ]]; then
577549
log "Tauri-signing: $(basename "$bundle")"
578550
# Use tauri signer to sign the bundle
@@ -591,9 +563,9 @@ sign_updates() {
591563

592564
# Read .sig file contents
593565
local sig_mac="" sig_win="" sig_linux=""
594-
[[ -f "$release_dir/$FNAME_MAC_UPDATE.sig" ]] && { sig_mac=$(cat "$release_dir/$FNAME_MAC_UPDATE.sig"); rm "$release_dir/$FNAME_MAC_UPDATE.sig"; }
595-
[[ -f "$release_dir/$FNAME_WIN_UPDATE.sig" ]] && { sig_win=$(cat "$release_dir/$FNAME_WIN_UPDATE.sig"); rm "$release_dir/$FNAME_WIN_UPDATE.sig"; }
596-
[[ -f "$release_dir/$FNAME_LINUX_UPDATE.sig" ]] && { sig_linux=$(cat "$release_dir/$FNAME_LINUX_UPDATE.sig"); rm "$release_dir/$FNAME_LINUX_UPDATE.sig"; }
566+
[[ -f "$release_dir/$FNAME_MAC.sig" ]] && { sig_mac=$(cat "$release_dir/$FNAME_MAC.sig"); rm "$release_dir/$FNAME_MAC.sig"; }
567+
[[ -f "$release_dir/$FNAME_WIN.sig" ]] && { sig_win=$(cat "$release_dir/$FNAME_WIN.sig"); rm "$release_dir/$FNAME_WIN.sig"; }
568+
[[ -f "$release_dir/$FNAME_LINUX.sig" ]] && { sig_linux=$(cat "$release_dir/$FNAME_LINUX.sig"); rm "$release_dir/$FNAME_LINUX.sig"; }
597569

598570
local website_manifest="$REPO_ROOT/website/public/standalone-latest.json"
599571
cat > "$website_manifest" <<EOF
@@ -603,15 +575,15 @@ sign_updates() {
603575
"pub_date": "$pub_date",
604576
"platforms": {
605577
"darwin-aarch64": {
606-
"url": "$base_url/$FNAME_MAC_UPDATE",
578+
"url": "$base_url/$FNAME_MAC",
607579
"signature": "$sig_mac"
608580
},
609581
"windows-x86_64": {
610-
"url": "$base_url/$FNAME_WIN_UPDATE",
582+
"url": "$base_url/$FNAME_WIN",
611583
"signature": "$sig_win"
612584
},
613585
"linux-x86_64": {
614-
"url": "$base_url/$FNAME_LINUX_UPDATE",
586+
"url": "$base_url/$FNAME_LINUX",
615587
"signature": "$sig_linux"
616588
}
617589
}

0 commit comments

Comments
 (0)