Small fixes to script
This commit is contained in:
parent
52bf5d73ce
commit
490cf0e33a
1 changed files with 2 additions and 1 deletions
|
@ -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.")
|
errorCount.push("Found a remote image: " + remoteImage + " in layer " + layer.id + ", please download it.")
|
||||||
const path = remoteImage.substring(remoteImage.lastIndexOf("/") + 1)
|
const path = remoteImage.substring(remoteImage.lastIndexOf("/") + 1)
|
||||||
linuxHints.push("wget " + remoteImage)
|
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) {
|
for (const image of images) {
|
||||||
if (!knownPaths.has(image)) {
|
if (!knownPaths.has(image)) {
|
||||||
|
@ -129,6 +129,7 @@ if (layerErrorCount.length + themeErrorCount.length == 0) {
|
||||||
console.log(errors)
|
console.log(errors)
|
||||||
const msg = (`Found ${layerErrorCount.length} errors in the layers; ${themeErrorCount.length} errors in the themes`)
|
const msg = (`Found ${layerErrorCount.length} errors in the layers; ${themeErrorCount.length} errors in the themes`)
|
||||||
console.log(msg)
|
console.log(msg)
|
||||||
|
console.log(linuxHints.join("\n"))
|
||||||
if (process.argv.indexOf("--report") >= 0) {
|
if (process.argv.indexOf("--report") >= 0) {
|
||||||
console.log("Writing report!")
|
console.log("Writing report!")
|
||||||
writeFileSync("layer_report.txt", errors)
|
writeFileSync("layer_report.txt", errors)
|
||||||
|
|
Loading…
Reference in a new issue