Add ChangeLog checking

pull/116/head
Gordon Williams 2020-03-05 13:15:03 +00:00
parent c3d6513d92
commit a772280871
2 changed files with 11 additions and 0 deletions

View File

@ -46,6 +46,17 @@ apps.forEach((app,addIdx) => {
var isApp = !app.type || app.type=="app";
if (app.name.length>20 && !app.shortName && isApp) ERROR(`App ${app.id} has a long name, but no shortName`);
if (!app.version) WARN(`App ${app.id} has no version`);
else {
if (!fs.existsSync(appDir+"ChangeLog")) {
if (app.version != "0.01")
WARN(`App ${app.id} has no ChangeLog`);
} else {
var versions = fs.readFileSync(appDir+"ChangeLog").toString().match(/\d+\.\d+:/g);
var lastChangeLog = versions.pop().slice(0,-1);
if (lastChangeLog != app.version)
WARN(`App ${app.id} app version (${app.version}) and ChangeLog (${lastChangeLog}) don't agree`);
}
}
if (!app.description) ERROR(`App ${app.id} has no description`);
if (!app.icon) ERROR(`App ${app.id} has no icon`);
if (!fs.existsSync(appDir+app.icon)) ERROR(`App ${app.id} icon doesn't exist`);