From b279a9693c3fdb5bb6110a2ac4cb6baaf4ec4a45 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 26 Nov 2020 12:10:56 +0000 Subject: [PATCH] Tools: Fixed git-changelog error with empty tag --- packages/tools/git-changelog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/tools/git-changelog.js b/packages/tools/git-changelog.js index ff6a0b8c9..864b6a6cb 100644 --- a/packages/tools/git-changelog.js +++ b/packages/tools/git-changelog.js @@ -47,7 +47,7 @@ async function gitLog(sinceTag) { async function gitTags() { const lines = await execCommand('git tag --sort=committerdate'); - return lines.split('\n').map(l => l.trim()); + return lines.split('\n').map(l => l.trim()).filter(l => !!l); } function platformFromTag(tagName) { @@ -57,7 +57,7 @@ function platformFromTag(tagName) { if (tagName.indexOf('clipper') === 0) return 'clipper'; if (tagName.indexOf('cli') === 0) return 'cli'; if (tagName.indexOf('plugin-generator') === 0) return 'plugin-generator'; - throw new Error(`Could not determine platform from tag: ${tagName}`); + throw new Error(`Could not determine platform from tag: "${tagName}"`); } // function tagPrefixFromPlatform(platform) {