mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
Tell desktop app users when a newer release is out, and release 3.0.2
The app now asks GitHub for the newest vX.Y.Z tag when it starts and, when it is ahead, the top bar says so with a button that copies `plan2code update`. Before, the app only compared its own version with the installed skills, so it never knew a release existed. Version 3.0.2 everywhere (version.json, package.json, the app's package.json, package-lock.json, Cargo.toml, Cargo.lock, tauri.conf.json, README, CHANGELOG).
This commit is contained in:
1 parent
76e0c44e0b
commit
9226b82c37
15 files changed
+220
-17
No files matched your search
@@ -765,6 +765,17 @@ fn version_status(app: tauri::AppHandle) -> versions::VersionStatus {
|
||||
)
|
||||
}
|
||||
|
||||
/// The newest GitHub release's version when it is newer than this app, else none (also none on
|
||||
/// any failure to ask). The page asks once at start and never waits on it.
|
||||
#[tauri::command]
|
||||
async fn check_new_release(app: tauri::AppHandle) -> Option<String> {
|
||||
let version = app.package_info().version.to_string();
|
||||
tauri::async_runtime::spawn_blocking(move || versions::check_new_release(&version))
|
||||
.await
|
||||
.ok()
|
||||
.flatten()
|
||||
}
|
||||
|
||||
/// What `update_skills` resolves with: the installer's last line, and the version status
|
||||
/// re-read afterwards, so the bar can say plainly whether the mismatch is actually gone.
|
||||
#[derive(serde::Serialize)]
|
||||
@@ -1319,6 +1330,7 @@ fn main() {
|
||||
save_term_panel,
|
||||
save_first_run_done,
|
||||
version_status,
|
||||
check_new_release,
|
||||
update_skills,
|
||||
pick_project_folder,
|
||||
change_project,
|
||||
|
||||
Reference in new issue
Block a user