mirror of https://github.com/espruino/BangleApps
sanitycheck: avoid error after emitting changelog error
parent
d3aef9c7b4
commit
07adead2ca
|
@ -150,10 +150,13 @@ apps.forEach((app,appIdx) => {
|
||||||
} else {
|
} else {
|
||||||
var changeLog = fs.readFileSync(appDir+"ChangeLog").toString();
|
var changeLog = fs.readFileSync(appDir+"ChangeLog").toString();
|
||||||
var versions = changeLog.match(/\d+\.\d+:/g);
|
var versions = changeLog.match(/\d+\.\d+:/g);
|
||||||
if (!versions) ERROR(`No versions found in ${app.id} ChangeLog (${appDir}ChangeLog)`, {file:metadataFile});
|
if (!versions) {
|
||||||
var lastChangeLog = versions.pop().slice(0,-1);
|
ERROR(`No versions found in ${app.id} ChangeLog (${appDir}ChangeLog)`, {file:metadataFile});
|
||||||
if (lastChangeLog != app.version)
|
} else {
|
||||||
ERROR(`App ${app.id} app version (${app.version}) and ChangeLog (${lastChangeLog}) don't agree`, {file:appDirRelative+"ChangeLog", line:changeLog.split("\n").length-1});
|
var lastChangeLog = versions.pop().slice(0,-1);
|
||||||
|
if (lastChangeLog != app.version)
|
||||||
|
ERROR(`App ${app.id} app version (${app.version}) and ChangeLog (${lastChangeLog}) don't agree`, {file:appDirRelative+"ChangeLog", line:changeLog.split("\n").length-1});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!app.description) ERROR(`App ${app.id} has no description`, {file:metadataFile});
|
if (!app.description) ERROR(`App ${app.id} has no description`, {file:metadataFile});
|
||||||
|
|
Loading…
Reference in New Issue