Small tweaks
This commit is contained in:
parent
081a281c04
commit
cd6f511bda
5 changed files with 17 additions and 12 deletions
6
.github/workflows/pull_request_check.yml
vendored
6
.github/workflows/pull_request_check.yml
vendored
|
@ -24,10 +24,10 @@ jobs:
|
||||||
- name: create stub themes
|
- name: create stub themes
|
||||||
run: "echo '{\"layers\": [], \"themes\": []}' > ./assets/generated/known_layers_and_themes.json"
|
run: "echo '{\"layers\": [], \"themes\": []}' > ./assets/generated/known_layers_and_themes.json"
|
||||||
|
|
||||||
|
- name: Compile license info; creates missing_licenses.txt if any missing
|
||||||
- name: Compile license info
|
|
||||||
run: npm run validate:licenses
|
run: npm run validate:licenses
|
||||||
|
|
||||||
- name: Compile and validate themes and layers
|
- name: Compile and validate themes and layers; creates layer_report.txt if any errors are found
|
||||||
run: npm run validate:layeroverview
|
run: npm run validate:layeroverview
|
||||||
|
|
||||||
|
|
||||||
|
|
6
.github/workflows/theme_validation.yml
vendored
6
.github/workflows/theme_validation.yml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
||||||
|
|
||||||
|
|
||||||
- name: Compile license info
|
- name: Compile license info
|
||||||
run: npm run validate:licenses
|
run: npm run generate:licenses
|
||||||
|
|
||||||
- name: Compile and validate themes and layers
|
- name: Compile themes and layers
|
||||||
run: npm run validate:layeroverview
|
run: npm run generate:layeroverview
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
"generate:translations": "ts-node scripts/generateTranslations.ts",
|
"generate:translations": "ts-node scripts/generateTranslations.ts",
|
||||||
"generate:layouts": "ts-node scripts/generateLayouts.ts",
|
"generate:layouts": "ts-node scripts/generateLayouts.ts",
|
||||||
"generate:docs": "ts-node scripts/generateDocs.ts",
|
"generate:docs": "ts-node scripts/generateDocs.ts",
|
||||||
"generate:layeroverview": "ts-node scripts/generateLayerOverview.ts --no-fail",
|
"generate:layeroverview": "ts-node scripts/generateLayerOverview.ts",
|
||||||
"generate:licenses": "ts-node scripts/generateLicenseInfo.ts --no-fail",
|
"generate:licenses": "ts-node scripts/generateLicenseInfo.ts",
|
||||||
"validate:layeroverview": "ts-node scripts/generateLayerOverview.ts --report",
|
"validate:layeroverview": "ts-node scripts/generateLayerOverview.ts --report",
|
||||||
"validate:licenses": "ts-node scripts/generateLicenseInfo.ts --report",
|
"validate:licenses": "ts-node scripts/generateLicenseInfo.ts --report",
|
||||||
"optimize-images": "cd assets/generated/ && find -name '*.png' -exec optipng '{}' \\; && echo 'PNGs are optimized'",
|
"optimize-images": "cd assets/generated/ && find -name '*.png' -exec optipng '{}' \\; && echo 'PNGs are optimized'",
|
||||||
|
|
|
@ -98,7 +98,7 @@ for (const themeFile of themeFiles) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// layer.builtin contains layer overrides - we can skip those
|
// layer.builtin contains layer overrides - we can skip those
|
||||||
layerErrorCount .push(validateLayer(layer, themeFile.id))
|
layerErrorCount .push(...validateLayer(layer, themeFile.id))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,6 +116,9 @@ for (const themeFile of themeFiles) {
|
||||||
themeErrorCount.push("Could not parse theme "+ themeFile["id"]+ "due to", e)
|
themeErrorCount.push("Could not parse theme "+ themeFile["id"]+ "due to", e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("LE", layerErrorCount)
|
||||||
|
|
||||||
if (layerErrorCount.length + themeErrorCount.length == 0) {
|
if (layerErrorCount.length + themeErrorCount.length == 0) {
|
||||||
console.log("All good!")
|
console.log("All good!")
|
||||||
} else {
|
} else {
|
||||||
|
@ -125,7 +128,7 @@ if (layerErrorCount.length + themeErrorCount.length == 0) {
|
||||||
if(process.argv.indexOf("--no-fail") >= 0) {
|
if(process.argv.indexOf("--no-fail") >= 0) {
|
||||||
console.log(msg)
|
console.log(msg)
|
||||||
}else if(process.argv.indexOf("--report") >= 0){
|
}else if(process.argv.indexOf("--report") >= 0){
|
||||||
writeFileSync("layer-report.txt", errors)
|
writeFileSync("layer_report.txt", errors)
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
throw msg;
|
throw msg;
|
||||||
|
|
|
@ -202,7 +202,9 @@ if(missingLicenses.length > 0){
|
||||||
const msg = `There are ${missingLicenses.length} licenses missing.`
|
const msg = `There are ${missingLicenses.length} licenses missing.`
|
||||||
if(process.argv.indexOf("--no-fail") >= 0){
|
if(process.argv.indexOf("--no-fail") >= 0){
|
||||||
console.log(msg)
|
console.log(msg)
|
||||||
}else{
|
}else if(process.argv.indexOf("--report") >= 0){
|
||||||
|
writeFileSync("missing_licenses.txt", missingLicenses.join("\n"))
|
||||||
|
} else{
|
||||||
|
|
||||||
throw msg
|
throw msg
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue