mirror of
https://gh-proxy.org/https://github.com/klinsmaya/workdsh.git
synced 2026-11-08 01:17:05 +08:00
fix(release): scope Web source gate to Web and DSH inputs
This commit is contained in:
@@ -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)'}`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user