chore: added git stash to release

This commit is contained in:
SamTV12345 2025-08-02 12:09:02 +02:00
parent 4e8bb72381
commit 2b3193378b

View file

@ -56,6 +56,8 @@ const readJson = (filename: string) => JSON.parse(fs.readFileSync(filename, {enc
const assertWorkDirClean = (opts:{ const assertWorkDirClean = (opts:{
cwd?: string; cwd?: string;
} = {}) => { } = {}) => {
// Stash any changes in the working directory so that we can check for modifications.
runc('git stash')
opts.cwd = runc('git rev-parse --show-cdup', opts) || cwd; opts.cwd = runc('git rev-parse --show-cdup', opts) || cwd;
const m = runc('git diff-files --name-status', opts); const m = runc('git diff-files --name-status', opts);
console.log(">"+m.trim()+"<") console.log(">"+m.trim()+"<")