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
{{ message }}
Repository navigation
Commit d9005e5
Browse filesBrowse the repository at this point in the historyBrowse files
feat: make the linux installer script url overridable too
Overriding app_update_url alone was not enough to genuinely test an update
on linux. Windows and mac download and install the artifact named in the
manifest, but linux installs nothing from it- it pipes an installer script
into bash and that script decides what to install. So detection used the
overridden manifest while the install still fetched the production
installer, which reported a fake version and then installed the real build.
Add app_update_linux_installer_url to the allowlist and route the linux
install through it, so every shipped platform can now be tested end to end.
The url is taken as given. Whatever it points at is piped into bash anyway,
so sanitising the url would buy nothing- it can only come from our own
https constant or from a file that only root can create.
Two guards so this cannot hurt the update path:
- the config read is raced against a timeout. It is awaited at quit time,
when the node process may already be gone, and a read that never settled
would hang the quit rather than just the update.
- the read is warmed at boot, because a window that only inherits an
already scheduled update never runs an update check and would otherwise
first touch the disk at quit time.
Any failure reading the override falls back to the shipped default and the
update proceeds as normal.
Also add reference samples under appUpdater/unit-tests: an override config,
a fake update manifest and a fake installer that just prints "update done".
They point at each other over the dev server so they work as-is.
"Only version, notes and platforms are read by the updater (see getUpdateDetails in",
8
+
"update-electron.js / main.js). Everything else here, including this _readme, is ignored.",
9
+
"",
10
+
"version : must be valid semver and GREATER than the installed build, or the app reports",
11
+
" 'no updates available'. 99.9.9 is used so it always wins.",
12
+
"notes : markdown, rendered as-is in the update dialog. Handy place to prove which",
13
+
" manifest was actually fetched.",
14
+
"",
15
+
"platform keys are `${os}-${arch}` where os is windows|darwin|linux. Careful: arch differs",
16
+
"by shell - electron uses node's process.arch (x64, arm64) while tauri uses os.arch()",
17
+
"(x86_64, aarch64), so the same machine wants a different key on each. All of them are",
18
+
"listed below so this file works either way. To see yours, run in the app:",
19
+
" await Phoenix.app.getPlatformArch()",
20
+
"",
21
+
"WARNING - the platform `url` is real on windows/mac: it is downloaded and run as an",
22
+
"installer. Linux ignores it entirely and pipes app_update_linux_installer_url into bash",
23
+
"instead. The urls below are deliberately dead ends so nothing can install by accident."
24
+
],
25
+
26
+
"version": "99.9.9",
27
+
"notes": "# Fake update from the LOCAL OVERRIDE manifest\n\nIf you can read this, the app fetched its update manifest from **localhost** and not from updates.phcode.io.\n\n- nothing here is real\n- nothing will be installed",
0 commit comments