fix: skip update checks for development builds

Development builds (containing -dirty or git commit hashes) will no
longer check for updates automatically to avoid confusion during
development. Manual checks can still be forced for testing.
This commit is contained in:
Pulse Monitor
2025-08-27 18:47:10 +00:00
parent c646a7e9c8
commit 63e7486722
+8
View File
@@ -77,6 +77,14 @@ const checkForUpdates = async (force = false): Promise<void> => {
setUpdateAvailable(false);
return;
}
// Skip dev builds unless forcing (contains -dirty or commit hash after version)
const isDirtyBuild = version.version.includes('-dirty') ||
/v\d+\.\d+\.\d+.*-g[0-9a-f]+/.test(version.version);
if (isDirtyBuild && !force) {
setUpdateAvailable(false);
return;
}
// Get the saved update channel from system settings
const info = await UpdatesAPI.checkForUpdates();