vnxt 1.9.0 → 1.9.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/vnxt.js +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vnxt",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Version incrementation CLI tool with built in git commit, push and changelog generation",
5
5
  "main": "vnxt.js",
6
6
  "bin": {
package/vnxt.js CHANGED
@@ -409,9 +409,18 @@ npm install ${packageJson.name}@${newVersion}
409
409
  See [CHANGELOG.md](./CHANGELOG.md) for complete version history.
410
410
  `;
411
411
 
412
- const filename = `release-notes-${config.tagPrefix}${newVersion}.md`;
412
+ const releaseNotesDir = 'release-notes';
413
+ if (!fs.existsSync(releaseNotesDir)) {
414
+ fs.mkdirSync(releaseNotesDir);
415
+ }
416
+
417
+ const filename = `${releaseNotesDir}/${config.tagPrefix}${newVersion}.md`;
413
418
  fs.writeFileSync(filename, releaseNotes);
414
419
  log(` Created: ${filename}`);
420
+
421
+ // Stage and amend commit to include release notes
422
+ execSync(`git add ${filename}`, {stdio: 'pipe'});
423
+ execSync(`git commit --amend --no-edit`, {stdio: 'pipe'});
415
424
  }
416
425
 
417
426
  // PUSH TO REMOTE