From 10df375e6957288b58787b9a31803171d03fae68 Mon Sep 17 00:00:00 2001 From: Markus Schulte Date: Fri, 8 Mar 2024 15:19:26 +0100 Subject: [PATCH 1/3] 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. --- lib/lifecycles/bump.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/lifecycles/bump.js b/lib/lifecycles/bump.js index ad5b2386b..43807ac87 100644 --- a/lib/lifecycles/bump.js +++ b/lib/lifecycles/bump.js @@ -222,10 +222,16 @@ function updateConfigs(args, newVersion) { } const configPath = path.resolve(process.cwd(), updater.filename); try { - if (dotgit.ignore(updater.filename)) return; + if (dotgit.ignore(updater.filename)) { + console.debug(updater.filename + ' is ignored in Git') + return; + } const stat = fs.lstatSync(configPath); - if (!stat.isFile()) return; + if (!stat.isFile()) { + console.debug(updater.filename + ' is not a file') + return; + } const contents = fs.readFileSync(configPath, 'utf8'); const newContents = updater.updater.writeVersion(contents, newVersion); const realNewVersion = updater.updater.readVersion(newContents); From 6783ee3c217528203f59efca6398d7181392d47a Mon Sep 17 00:00:00 2001 From: Markus Schulte Date: Tue, 2 Apr 2024 12:01:08 +0200 Subject: [PATCH 2/3] chore(#131): Update formatting --- lib/lifecycles/bump.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lifecycles/bump.js b/lib/lifecycles/bump.js index 43807ac87..34f60a14e 100644 --- a/lib/lifecycles/bump.js +++ b/lib/lifecycles/bump.js @@ -223,13 +223,13 @@ function updateConfigs(args, newVersion) { const configPath = path.resolve(process.cwd(), updater.filename); try { if (dotgit.ignore(updater.filename)) { - console.debug(updater.filename + ' is ignored in Git') + console.debug(updater.filename + ' is ignored in Git'); return; } const stat = fs.lstatSync(configPath); if (!stat.isFile()) { - console.debug(updater.filename + ' is not a file') + console.debug(updater.filename + ' is not a file'); return; } const contents = fs.readFileSync(configPath, 'utf8'); From 6c959390c623f7ea2ea2c81b4803615d3cab2f64 Mon Sep 17 00:00:00 2001 From: Markus Schulte Date: Tue, 2 Apr 2024 12:07:11 +0200 Subject: [PATCH 3/3] chore(#131): Improve debug messages for exclusions during bump lifecycle --- lib/lifecycles/bump.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/lifecycles/bump.js b/lib/lifecycles/bump.js index 34f60a14e..d0c6fb0bc 100644 --- a/lib/lifecycles/bump.js +++ b/lib/lifecycles/bump.js @@ -223,13 +223,17 @@ function updateConfigs(args, newVersion) { const configPath = path.resolve(process.cwd(), updater.filename); try { if (dotgit.ignore(updater.filename)) { - console.debug(updater.filename + ' is ignored in Git'); + console.debug( + `Not updating file '${updater.filename}', as it is ignored in Git`, + ); return; } const stat = fs.lstatSync(configPath); if (!stat.isFile()) { - console.debug(updater.filename + ' is not a file'); + console.debug( + `Not updating '${updater.filename}', as it is not a file`, + ); return; } const contents = fs.readFileSync(configPath, 'utf8');