bbump 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -36,10 +36,15 @@ try {
|
|
|
36
36
|
|
|
37
37
|
// Add only package.json and lockfile to Git
|
|
38
38
|
const lockfile = isYarn ? 'yarn.lock' : 'package-lock.json';
|
|
39
|
-
|
|
39
|
+
const filesToAdd = ['package.json'];
|
|
40
|
+
if (existsSync(lockfile)) {
|
|
41
|
+
filesToAdd.push(lockfile);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
execSync(`git add ${filesToAdd.join(' ')}`, { stdio: 'inherit' });
|
|
40
45
|
|
|
41
46
|
// Commit only the specified files with a fixed commit message
|
|
42
|
-
execSync(`git commit -m "chore: bump version"
|
|
47
|
+
execSync(`git commit -m "chore: bump version" ${filesToAdd.join(' ')}`, { stdio: 'inherit' });
|
|
43
48
|
|
|
44
49
|
console.log(`Version bumped to ${versionType} and changes committed with message: 'chore: bump version'.`);
|
|
45
50
|
} catch (error) {
|