fix(release): show version plan deletion log in dry-run (#27744)

This commit is contained in:
James Henry 2024-09-04 18:06:19 +04:00 committed by GitHub
parent 1108ebf0c6
commit 00b5d3927d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -946,7 +946,7 @@ async function applyChangesAndExit(
const changedFiles: string[] = changes.map((f) => f.path); const changedFiles: string[] = changes.map((f) => f.path);
let deletedFiles: string[] = []; let deletedFiles: string[] = [];
if (args.deleteVersionPlans && !args.dryRun) { if (args.deleteVersionPlans) {
const planFiles = new Set<string>(); const planFiles = new Set<string>();
releaseGroups.forEach((group) => { releaseGroups.forEach((group) => {
if (group.resolvedVersionPlans) { if (group.resolvedVersionPlans) {

View File

@ -193,7 +193,7 @@ export async function gitAdd({
if (isFileIgnored) { if (isFileIgnored) {
ignoredFiles.push(f); ignoredFiles.push(f);
// git add will fail if trying to add an untracked file that doesn't exist // git add will fail if trying to add an untracked file that doesn't exist
} else if (changedTrackedFiles.has(f)) { } else if (changedTrackedFiles.has(f) || dryRun) {
filesToAdd.push(f); filesToAdd.push(f);
} }
} }