You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The building process with a certificate is correct
* docs: update release process documentation and add signing key requirements
* fix: update publication date for Circle Camera 0.3.1 release
4.**Verify the public key in config**: Ensure `src-tauri/tauri.conf.json` contains the correct public key from `~/.tauri/circle-camera.key.pub` in the `plugins.updater.pubkey` field.
24
49
25
50
### Triggering a New Release
26
51
@@ -51,9 +76,29 @@ The script performs the following steps:
51
76
1.**Branch Check**: Verifies you are on the `main` branch (can be overridden for testing: `./scripts/release.sh <branch-name>`).
52
77
2.**Get Version**: Extracts the version from `package.json` to create the tag (e.g., `v0.3.1`).
53
78
3.**Validate**: Runs `pnpm validate` (checks TypeScript and Rust code).
54
-
4.**Build**: Runs `pnpm tauri build --target universal-apple-darwin` to create the universal DMG.
55
-
5.**Create Draft Release**: Uses `gh release create` to make a draft release on GitHub with the extracted tag.
56
-
6.**Upload Asset**: Uses `gh release upload` to attach the built DMG to the draft release.
79
+
4.**Signing Key Check**: Verifies that the required signing keys exist.
80
+
5.**Environment Variable Setup**: Ensures the `TAURI_SIGNING_PRIVATE_KEY` environment variable is set.
81
+
6.**Build**: Runs `pnpm tauri build --target universal-apple-darwin` to create the universal DMG with embedded public key.
82
+
7.**Generate Update Information**: Runs `pnpm generate:update-json` to create the `latest.json` file with signatures for the update system.
83
+
8.**Create Draft Release**: Uses `gh release create` to make a draft release on GitHub with the extracted tag.
84
+
9.**Upload Assets**: Uploads both the built DMG and `latest.json` to the draft release.
85
+
86
+
## Auto-Update System
87
+
88
+
The Circle Camera app includes an auto-update system that checks for new releases and can download and install them automatically. This system requires:
89
+
90
+
1.**Proper Signing**: Each release must be signed using the private key.
91
+
2.**Update Information**: The `latest.json` file must be generated and uploaded to the release.
92
+
3.**Public Key Distribution**: The app must be built with the public key embedded.
93
+
94
+
The release script handles all these requirements automatically, but it's important to understand how they work if you need to troubleshoot issues.
95
+
96
+
### Update Flow
97
+
98
+
1. When the app starts, it checks the URL specified in `tauri.conf.json` (`plugins.updater.endpoints`) for the `latest.json` file.
99
+
2. If a newer version is found, the app downloads the update package.
100
+
3. The signature in the `latest.json` file is verified using the embedded public key.
101
+
4. If verification succeeds, the app offers to install the update.
57
102
58
103
## Manual Steps After Script Completion
59
104
@@ -66,6 +111,7 @@ Once the script finishes successfully:
66
111
* List new features, improvements, and bug fixes.
67
112
4.**Review the attached assets**:
68
113
* Verify the universal DMG is present.
114
+
* Verify the `latest.json` file is present with correct signatures.
69
115
5.**Publish the release** when ready.
70
116
71
117
## Testing Before Publishing
@@ -77,7 +123,19 @@ Before publishing the release:
77
123
* macOS with Apple Silicon (M1/M2/M3)
78
124
* macOS with Intel processor
79
125
3. Verify that all new features/fixes work correctly.
80
-
4. Test the auto-update mechanism by generating the `latest.json` (this is currently a separate manual step if needed, see `scripts/generate-update-json.js`).
126
+
4. Test the auto-update mechanism:
127
+
* Install an older version of the app.
128
+
* Publish the new release.
129
+
* Verify that the older version detects and can update to the new version.
130
+
131
+
## Troubleshooting the Update System
132
+
133
+
If updates aren't working correctly:
134
+
135
+
1.**Check the public key**: Ensure the public key in `tauri.conf.json` matches the actual public key at `~/.tauri/circle-camera.key.pub`.
136
+
2.**Verify signatures**: Check that the `latest.json` file contains valid signatures.
137
+
3.**Validate endpoints**: Make sure the update endpoint in `tauri.conf.json` points to the correct location where `latest.json` is hosted.
138
+
4.**Debug logging**: Enable verbose logging in the app to see the update process in detail.
0 commit comments