mirror of
https://github.com/pepaskopec-blip/Graduately.git
synced 2026-10-27 15:14:35 +00:00
Add a self-updater that installs new releases.
Bake the release tag into the binary so the app knows what it is running; plain builds keep the "dev" default and never offer an update. The CI workflow already exported the tag on Linux and macOS, so only the Windows job needed it. Read the newest version from the redirect GitHub serves for /releases/latest, which avoids the REST API and its unauthenticated rate limit and needs no JSON parser. Networking goes through the curl command rather than a linked library: curl handles TLS, redirects and proxies, it ships on all three platforms, and it keeps the bundling scripts free of another shared library. An application cannot reliably replace its own files while running, so every platform follows one shape: unpack beside the current install, write a script that waits for this process to exit before swapping, then launch it detached and quit. Staging beside the install keeps the move on one filesystem and fails early when the location is read-only. The Windows script copies without mirroring so the progress files kept inside the install directory survive. Check quietly a few seconds after startup and offer the result in a banner above the pages, with a manual check in the settings popover. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
ae56a1c1da
commit
91a848b408
10 changed files with 1084 additions and 4 deletions
86
style.css
86
style.css
|
|
@ -743,6 +743,92 @@ flowboxchild {
|
|||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* Updates */
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
.update-banner {
|
||||
background-color: alpha(@accent, 0.12);
|
||||
border-bottom: 1px solid alpha(@accent, 0.3);
|
||||
padding: 8px 16px;
|
||||
}
|
||||
.update-banner-text {
|
||||
color: @fg_text;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.update-banner-btn {
|
||||
background-image: none;
|
||||
background-color: @accent;
|
||||
color: @on_accent;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
padding: 5px 14px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
box-shadow: none;
|
||||
transition: background-color 120ms ease;
|
||||
}
|
||||
.update-banner-btn:hover {
|
||||
background-color: shade(@accent, 1.1);
|
||||
}
|
||||
.update-banner-later {
|
||||
background-image: none;
|
||||
background-color: transparent;
|
||||
color: @fg_subtext;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
padding: 5px 10px;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
box-shadow: none;
|
||||
}
|
||||
.update-banner-later:hover {
|
||||
background-color: alpha(@fg_text, 0.09);
|
||||
color: @fg_text;
|
||||
}
|
||||
.update-status {
|
||||
color: @fg_subtext;
|
||||
font-size: 12px;
|
||||
}
|
||||
.update-btn {
|
||||
background-image: none;
|
||||
background-color: mix(@bg_base, @bg_surface0, 0.7);
|
||||
color: @fg_text;
|
||||
border: 1px solid alpha(@fg_text, 0.12);
|
||||
border-radius: 8px;
|
||||
padding: 5px 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
box-shadow: none;
|
||||
transition: background-color 120ms ease, border-color 120ms ease;
|
||||
}
|
||||
.update-btn:hover {
|
||||
background-image: none;
|
||||
background-color: mix(@bg_base, @bg_surface0, 1.0);
|
||||
border-color: alpha(@accent, 0.7);
|
||||
}
|
||||
.update-btn:disabled {
|
||||
color: @fg_overlay;
|
||||
}
|
||||
.update-progress,
|
||||
.update-progress trough {
|
||||
min-height: 6px;
|
||||
min-width: 6px;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
padding: 0;
|
||||
background-color: alpha(@fg_text, 0.11);
|
||||
}
|
||||
.update-progress progress {
|
||||
min-height: 6px;
|
||||
min-width: 6px;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
background-image: none;
|
||||
background-color: @accent;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* Statistics */
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue