The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(bundles): write the build stamp before flavored icons land
alt-glitch3193d76d9edf
diff --git a/apps/desktop/scripts/build.mjs b/apps/desktop/scripts/build.mjsindex 3ef14860fc4..3c635c080fe 100644--- a/apps/desktop/scripts/build.mjs+++ b/apps/desktop/scripts/build.mjs@@ -10,6 +10,9 @@ export function buildSourceDesktop({ source = repoRoot, icons, run = execFileSynconst app = join(source, 'apps/desktop')const step = (script, args = []) => run(process.execPath, [join(source, script), ...args], { cwd: app, stdio: 'inherit' })step('apps/desktop/scripts/assert-root-install.mjs')+ // Stamp before the flavored icons land: they overwrite committed files, and+ // the stamp's git check would then call the checkout dirty.+ step('apps/desktop/scripts/write-build-stamp.mjs')// Default-brand icons are committed; only flavored release builds pass --icons.icons = resolve(icons ?? source)if (icons !== source) {@@ -17,7 +20,6 @@ export function buildSourceDesktop({ source = repoRoot, icons, run = execFileSyn// prepared pixels; do not create another Python environment to redraw them.cpSync(join(icons, 'apps/desktop/assets'), join(app, 'assets'), { recursive: true })}- step('apps/desktop/scripts/write-build-stamp.mjs')// locales/_keys.desktop.json is a committed artifact (i18n-keys.test.mjs pins it to en.ts);// the build must not write into the checkout — a dirty tree breaks `hermes update`.step('apps/desktop/scripts/stage-native-deps.mjs')diff --git a/scripts/bundles/desktop.py b/scripts/bundles/desktop.pyindex aebe46450d5..974e8ec8019 100644--- a/scripts/bundles/desktop.py+++ b/scripts/bundles/desktop.py@@ -121,8 +121,10 @@ def _build_prepared(prepared, builder_args: list[str], variant: str | None) -> N# The admitted checkout stays clean across the whole build: packaging reads# its artwork from the workspace, so the render lives there only while# electron-builder holds it, and the final check proves it was handed back.+ # Stamp before the render lands: the stamp's git check would call the+ # checkout dirty while the flavored icons sit over committed files.+ run([node, "scripts/write-build-stamp.mjs"], cwd=desktop, env=env)with flavored_assets(icons / "apps/desktop/assets", desktop / "assets"):- run([node, "scripts/write-build-stamp.mjs"], cwd=desktop, env=env)run([node, "scripts/build/desktop.mjs", "--source", str(repo), "--icons", str(icons),"--stamp", str(desktop / "build/install-stamp.json"), "--native-deps", str(prepared.native),"--out", str(desktop / "dist")], cwd=repo, env=env)