desktop-release: a fixed release tool left uncommitted for release --resume does not make the build dirty

This commit is contained in:
CRTkafa 2026-10-29 20:04:08 +07:00
parent 6ebb656018
commit 1c64320b65

View file

@ -285,7 +285,8 @@ function writeVersionFiles(out: string, manifest: Manifest): void {
function gitState(): { commit: string; dirty: boolean } {
const commit = run(['git', 'rev-parse', 'HEAD'], { cwd: ROOT }).out.trim();
const dirty = run(['git', 'status', '--porcelain'], { cwd: ROOT }).out.trim().length > 0;
// a fixed release tool (release --resume after a tool bug) is not part of what ships: the build stays clean
const dirty = run(['git', 'status', '--porcelain'], { cwd: ROOT }).out.split('\n').some(l => l.trim() && !/^ M tools\/(desktop-)?release(-candidate)?\.ts$/.test(l));
return { commit, dirty };
}