1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Tools: Fixed git-changelog error with empty tag

This commit is contained in:
Laurent Cozic 2020-11-26 12:10:56 +00:00
parent a37f84e988
commit b279a9693c

View File

@ -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) {