Skip to content

Commit aabfcc4

Browse files
committed
fix: generate notes from last official version
1 parent 09c94bb commit aabfcc4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

generateNotes.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
const changelog = require('conventional-changelog')
22
const parseUrl = require('github-url-from-git')
3+
const execSync = require('child_process').execSync;
4+
5+
const describe = () => execSync('git describe --tags master', { encoding: 'utf8' });
6+
const baseTag = (tag) => tag.replace(/(v[0-9.]+)(.*)/, '$1').trim();
7+
const lastTag = () => baseTag(describe());
38

49
module.exports = function (pluginConfig, {pkg}, cb) {
510
const repository = pkg.repository ? parseUrl(pkg.repository.url) : null
6-
const from = "v2.3.0"; // TODO: set to git tag of last official version
11+
const from = lastTag();
712

813
changelog({
914
version: pkg.version,

0 commit comments

Comments
 (0)