mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 18:45:53 +00:00
b58baa9d14
- Fix download URL property mismatch (downloadUrl vs browser_download_url) - Add comprehensive error logging for update failures - Create test mode for update mechanism (UPDATE_TEST_MODE=true) - Add test script for easy update testing without releases - Improve restart logic for different deployment environments - Add tar package dependency for creating update packages - Update .gitignore to exclude backup and temp directories - Add documentation for update testing workflow 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1.7 KiB
1.7 KiB
Update Mechanism Testing
This document describes how to test the Pulse update mechanism without creating real GitHub releases.
Test Mode
The update system includes a test mode that simulates available updates without requiring actual releases.
How to Use
-
Start the server in test mode:
./scripts/test-update.shOr with a custom version:
./scripts/test-update.sh 5.0.0 -
Open Pulse in your browser and go to Settings
-
Click "Check for Updates" - you should see version 99.99.99 (or your custom version) available
-
Click "Apply Update" to test the update process
What Happens in Test Mode
- The update check returns a mock release with version 99.99.99 (or custom)
- A mock tarball is created on-the-fly from current application files
- The update process runs normally but with the test package
- You can test the entire flow: download, backup, extraction, restart
Environment Variables
UPDATE_TEST_MODE=true- Enables test modeUPDATE_TEST_VERSION=X.X.X- Sets the mock version number (default: 99.99.99)
Manual Testing
You can also manually set the environment variables:
UPDATE_TEST_MODE=true UPDATE_TEST_VERSION=10.0.0 npm run dev:server
Debugging
When in test mode, check the console for:
[UpdateManager] Test mode enabled, returning mock update info- Confirms test mode is active- Asset names and download URLs in browser console if update fails
- Server logs for the update process steps
Notes
- The mock tarball excludes node_modules, .git, temp, and backup directories
- The test download URL is:
http://localhost:3000/api/test/mock-update.tar.gz - This endpoint only works when
UPDATE_TEST_MODE=true