1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/bower_components/hammerjs/changelog.js
Luke Pulverenti 8a6884abef minify
2017-01-27 18:07:14 -05:00

1 line
No EOL
1.2 KiB
JavaScript

var changelog=require("changelogplease"),gittags=require("git-tags").get(function(error,tags){function parseLog(log){var lines=log.split("\n"),log=[];lines.shift(),lines.forEach(function(line){var newLine=parseLine(line);newLine&&log.push(line)});var log=log.join("\n");return log.replace(/\*/g,"-").replace(/__TICKETREF__,/g,"")}function parseLine(line){var parts=getParts(line);return!(exclude.indexOf(parts.component)>-1)&&parts}function getParts(line){var message,parts=line.split(":"),component="";line.match(/\{\{([A-Za-z0-9 ]){0,99}\}\}/);return parts.length>1&&parts[0].length<=20?(component=parts[0],parts.shift(),message=parts.join(":")):(parts=line.split(" "),component=parts[1],parts.shift(),message=parts.join(" ")),component&&(component=component.replace(/\* |,/,"")),{component:component,message:message}}if(error)throw error;console.log(tags[1]+".."+tags[0]);var exclude=["Merge","Whitespace","Fixup","Cleanup","Formatting","Ignore"];changelog({ticketUrl:"https://github.com/hammerjs/hammer.js/issues/{id}",commitUrl:"https://github.com/hammerjs/hammerjs/commit/{id}",sort:!1,repo:"./",committish:tags[1]+".."+tags[0]},function(error,log){if(error)throw error;log=parseLog(log),console.log(log)})});