Small fixes to script

This commit is contained in:
pietervdvn 2021-04-11 03:28:24 +02:00
parent 52bf5d73ce
commit 490cf0e33a

View file

@ -66,7 +66,7 @@ function validateLayer(layerJson: LayerConfigJson, context?: string): string[] {
errorCount.push("Found a remote image: " + remoteImage + " in layer " + layer.id + ", please download it.")
const path = remoteImage.substring(remoteImage.lastIndexOf("/") + 1)
linuxHints.push("wget " + remoteImage)
linuxHints.push(`echo '{"path":"${path}", "license": "<insert license here>", "authors": [ "<insert author(s) here"], "sources": [${remoteImage}]`)
linuxHints.push(`echo '{"path":"${path}", "license": "<insert license here>", "authors": [ "<insert author(s) here"], "sources": [${remoteImage}] > ${path}.license_info.json`)
}
for (const image of images) {
if (!knownPaths.has(image)) {
@ -129,6 +129,7 @@ if (layerErrorCount.length + themeErrorCount.length == 0) {
console.log(errors)
const msg = (`Found ${layerErrorCount.length} errors in the layers; ${themeErrorCount.length} errors in the themes`)
console.log(msg)
console.log(linuxHints.join("\n"))
if (process.argv.indexOf("--report") >= 0) {
console.log("Writing report!")
writeFileSync("layer_report.txt", errors)