v1.0.21: auto-updater removes legacy SVG icons on update
Staff machines still had idle.svg/running.svg in their installed plugin folder (Stream Deck merges rather than replaces on reinstall), causing the old SVGs to shadow the new PNG icons added in v1.0.15. The auto-updater now explicitly deletes these legacy files when applying an update. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6438,7 +6438,7 @@ async function stopTimer(token, entryId) {
|
||||
}
|
||||
|
||||
// src/plugin.ts
|
||||
var CURRENT_VERSION = "1.0.20";
|
||||
var CURRENT_VERSION = "1.0.21";
|
||||
var GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/master";
|
||||
var SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
|
||||
MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4=
|
||||
@@ -6510,6 +6510,13 @@ async function checkForUpdates(sendStatus) {
|
||||
}
|
||||
fs3.writeFileSync(path5.join(pluginRoot, ASSETS[i]), Buffer.from(await assetResps[i].arrayBuffer()));
|
||||
}
|
||||
const LEGACY = ["imgs/idle.svg", "imgs/running.svg"];
|
||||
for (const f of LEGACY) {
|
||||
try {
|
||||
fs3.unlinkSync(path5.join(pluginRoot, f));
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
plugin_default.logger.info(`Updated to ${version}, restarting\u2026`);
|
||||
process.exit(0);
|
||||
} catch (err) {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
const CURRENT_VERSION = "1.0.20";
|
||||
const CURRENT_VERSION = "1.0.21";
|
||||
const GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/master";
|
||||
const SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
|
||||
MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4=
|
||||
@@ -73,6 +73,13 @@ async function checkForUpdates(sendStatus?: (msg: string) => void): Promise<void
|
||||
fs.writeFileSync(path.join(pluginRoot, ASSETS[i]), Buffer.from(await assetResps[i].arrayBuffer()));
|
||||
}
|
||||
|
||||
// Remove legacy files that were replaced in older versions but persist on disk
|
||||
// because Stream Deck merges rather than replaces the plugin folder on reinstall.
|
||||
const LEGACY = ["imgs/idle.svg", "imgs/running.svg"];
|
||||
for (const f of LEGACY) {
|
||||
try { fs.unlinkSync(path.join(pluginRoot, f)); } catch { /* already gone */ }
|
||||
}
|
||||
|
||||
streamDeck.logger.info(`Updated to ${version}, restarting…`);
|
||||
process.exit(0);
|
||||
} catch (err) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
{ "version": "1.0.20" }
|
||||
{ "version": "1.0.21" }
|
||||
|
||||
Reference in New Issue
Block a user