Skip to content

Commit a9191f2

Browse files
authored
fix: Add debug messages for exclusions during bump lifecycle (#131)
* chore: Add debug messages for exclusions in lifecycle bump Code has been modified to include debug messages in the bump lifecycle. When a filename is ignored by Git or is not a file, the program will now log a debug-level message. * chore(#131): Update formatting * chore(#131): Improve debug messages for exclusions during bump lifecycle
1 parent b9dccc2 commit a9191f2

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

lib/lifecycles/bump.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,20 @@ function updateConfigs(args, newVersion) {
222222
}
223223
const configPath = path.resolve(process.cwd(), updater.filename);
224224
try {
225-
if (dotgit.ignore(updater.filename)) return;
225+
if (dotgit.ignore(updater.filename)) {
226+
console.debug(
227+
`Not updating file '${updater.filename}', as it is ignored in Git`,
228+
);
229+
return;
230+
}
226231
const stat = fs.lstatSync(configPath);
227232

228-
if (!stat.isFile()) return;
233+
if (!stat.isFile()) {
234+
console.debug(
235+
`Not updating '${updater.filename}', as it is not a file`,
236+
);
237+
return;
238+
}
229239
const contents = fs.readFileSync(configPath, 'utf8');
230240
const newContents = updater.updater.writeVersion(contents, newVersion);
231241
const realNewVersion = updater.updater.readVersion(newContents);

0 commit comments

Comments
 (0)