fix(build): stop the runtime install stamp from staling web/desktop
Install/update completion rewrites the root install-stamp.json (fresh builtAt) after products are built, and the stamp was still a shared web/desktop source input, so every install left its own web_dist "missing, stale, or damaged" and the post-install probe failed on every installer E2E leg. Nothing in either build reads the root stamp; desktop's baked stamp is already tracked as a prepared input.
This commit is contained in:
@@ -44,7 +44,9 @@ export function sourceHash(source, product) {
|
||||
workspace, 'apps/shared', 'package.json', 'package-lock.json', '.npmrc', 'pm/lock.json',
|
||||
'scripts/build',
|
||||
'scripts/generate-icons.mjs', 'scripts/generate_icons.py',
|
||||
'assets', 'pyproject.toml', 'uv.lock', 'install-stamp.json',
|
||||
// The root install-stamp.json is runtime identity rewritten after every install; desktop's
|
||||
// baked stamp is a prepared input.
|
||||
'assets', 'pyproject.toml', 'uv.lock',
|
||||
], name => {
|
||||
// Build scripts are inputs; workspace build directories are outputs.
|
||||
const parts = name.split('/')
|
||||
|
||||
@@ -237,6 +237,9 @@ test('built web freshness follows shared sources and build inputs, not mtimes or
|
||||
expect(productCurrent({ source, product: 'web', out })).toBe(true)
|
||||
put(source, 'web/node_modules/.tmp/tsbuildinfo', 'generated')
|
||||
expect(productCurrent({ source, product: 'web', out })).toBe(true)
|
||||
// Install completion rewrites the runtime identity after building products.
|
||||
put(source, 'install-stamp.json', '{"builtAt": "later"}')
|
||||
expect(productCurrent({ source, product: 'web', out })).toBe(true)
|
||||
put(icons, 'web/public/favicon.ico', 'changed prepared icon')
|
||||
expect(productCurrent({ source, product: 'web', out })).toBe(false)
|
||||
await buildWeb({ source, icons, out })
|
||||
|
||||
Reference in New Issue
Block a user