mirror of https://github.com/espruino/BangleApps
Add check for unlinked READMEs
parent
735ab75b39
commit
94be5d4627
|
@ -6,6 +6,7 @@
|
|||
"icon": "app.png",
|
||||
"tags": "back,gesture,swipe",
|
||||
"supports" : ["BANGLEJS2"],
|
||||
"readme":"README.md",
|
||||
"type": "bootloader",
|
||||
"storage": [
|
||||
{"name":"backswipe.boot.js","url":"boot.js"},
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"icon": "icon.png",
|
||||
"tags": "health,tool,sensors,bluetooth",
|
||||
"supports": ["BANGLEJS2"],
|
||||
"readme":"README.md",
|
||||
"storage": [
|
||||
{"name":"btadv.app.js","url":"app.js"},
|
||||
{"name":"btadv.img","url":"icon.js","evaluate":true}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"type": "clkinfo",
|
||||
"tags": "clkinfo,timer",
|
||||
"supports" : ["BANGLEJS2"],
|
||||
"readme":"README.md",
|
||||
"allow_emulator": true,
|
||||
"storage": [
|
||||
{"name":"stopw.clkinfo.js","url":"clkinfo.js"}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"icon": "app.png",
|
||||
"tags": "tool,torch",
|
||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||
"readme":"README.md",
|
||||
"storage": [
|
||||
{"name":"torch.app.js","url":"app.js"},
|
||||
{"name":"torch.wid.js","url":"widget.js","supports": ["BANGLEJS"]},
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
"type": "widget",
|
||||
"description": "A simple widget that shows a yellow lightning icon to indicate whenever the watch is charging. This way one can see the charging status at a glance, no matter which battery widget is being used.",
|
||||
"tags": "widget",
|
||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||
"readme":"README.md",
|
||||
"storage": [
|
||||
{"name":"widChargingStatus.wid.js","url":"widget.js"}
|
||||
]
|
||||
|
|
|
@ -162,7 +162,14 @@ apps.forEach((app,appIdx) => {
|
|||
ERROR(`App ${app.id} screenshot file ${screenshot.url} not found`, {file:metadataFile});
|
||||
});
|
||||
}
|
||||
if (app.readme && !fs.existsSync(appDir+app.readme)) ERROR(`App ${app.id} README file doesn't exist`, {file:metadataFile});
|
||||
if (app.readme) {
|
||||
if (!fs.existsSync(appDir+app.readme))
|
||||
ERROR(`App ${app.id} README file doesn't exist`, {file:metadataFile});
|
||||
} else {
|
||||
let readme = fs.readdirSync(appDir).find(f => f.toLowerCase().includes("readme"));
|
||||
if (readme)
|
||||
ERROR(`App ${app.id} has a README in the directory (${readme}) but it's not linked`, {file:metadataFile});
|
||||
}
|
||||
if (app.custom && !fs.existsSync(appDir+app.custom)) ERROR(`App ${app.id} custom HTML doesn't exist`, {file:metadataFile});
|
||||
if (app.customConnect && !app.custom) ERROR(`App ${app.id} has customConnect but no customn HTML`, {file:metadataFile});
|
||||
if (app.interface && !fs.existsSync(appDir+app.interface)) ERROR(`App ${app.id} interface HTML doesn't exist`, {file:metadataFile});
|
||||
|
|
Loading…
Reference in New Issue