Skip to content

Commit 5989217

Browse files
tsvetomirgyoshev
authored andcommitted
refactor: trim tag name in git-describe
1 parent c8abc46 commit 5989217

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

generateNotes.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ const changelog = require('conventional-changelog')
22
const parseUrl = require('github-url-from-git')
33
const execSync = require('child_process').execSync;
44

5-
const describe = () => execSync('git describe --tags origin/master', { encoding: 'utf8' });
6-
const baseTag = (tag) => tag.replace(/(v[0-9.]+)(.*)/, '$1').trim();
7-
const lastTag = () => baseTag(describe());
5+
const lastTag = () => execSync('git describe --tags --abbrev=0 origin/master', { encoding: 'utf8' }).trim();
86

97
module.exports = function (pluginConfig, {pkg}, cb) {
108
const repository = pkg.repository ? parseUrl(pkg.repository.url) : null

0 commit comments

Comments
 (0)