fix(release): scope Web source gate to Web and DSH inputs

This commit is contained in:
techflag
2026-09-26 20:32:41 +08:00
parent b0bd304335
commit 8a6d7fb592
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ if (source === 'local') {
const manifest = JSON.parse(readFileSync(join(webRoot, '.artifacts', `project-v${version}`, 'release-manifest.json'), 'utf8'))
const commit = execFileSync('git', ['rev-parse', 'HEAD'], { cwd: root, encoding: 'utf8' }).trim()
if (manifest.version !== version || manifest.sourceCommit !== commit || manifest.sourceDirty) {
const changed = execFileSync('git', ['diff', '--name-only', '--ignore-submodules=dirty', 'HEAD', '--'], { cwd: root, encoding: 'utf8' }).trim()
const changed = execFileSync('git', ['diff', '--name-only', '--ignore-submodules=dirty', 'HEAD', '--', 'workdsh-web', 'upstream.json', 'deepseek-harness'], { cwd: root, encoding: 'utf8' }).trim()
throw new Error(`The local Web release candidate is not a clean package of this commit: version=${manifest.version}/${version}, commit=${manifest.sourceCommit}/${commit}, sourceDirty=${manifest.sourceDirty}, changed=${changed || '(none)'}`)
}
}
+3 -3
View File
@@ -38,9 +38,9 @@ for (const directory of packageDirectories) {
const sourceCommit = execFileSync('git', ['rev-parse', 'HEAD'], { cwd: root, encoding: 'utf8' }).trim();
let sourceDirty = false;
try {
// Build tools may create untracked platform-specific files. A release is
// dirty only when committed source or the pinned submodule gitlink changes.
execFileSync('git', ['diff', '--quiet', '--ignore-submodules=dirty', 'HEAD', '--'], { cwd: root, stdio: 'ignore' });
// Desktop package checks regenerate a tracked Windows icon. Web release
// cleanliness covers the Web source and the DSH version inputs it consumes.
execFileSync('git', ['diff', '--quiet', '--ignore-submodules=dirty', 'HEAD', '--', 'workdsh-web', 'upstream.json', 'deepseek-harness'], { cwd: root, stdio: 'ignore' });
} catch (error) {
if (error.status !== 1) throw error;
sourceDirty = true;