From 5cc852cc012deecc6ee8429ca9986ffda3aca8f2 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 11 Apr 2021 03:05:24 +0200 Subject: [PATCH] Experimenting with github actions --- scripts/generateLayerOverview.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/generateLayerOverview.ts b/scripts/generateLayerOverview.ts index c57055558..d59b292ca 100644 --- a/scripts/generateLayerOverview.ts +++ b/scripts/generateLayerOverview.ts @@ -51,17 +51,22 @@ for (const i in licenses) { } const knownPaths = new Set(licensePaths) +const linuxHints = [] + function validateLayer(layerJson: LayerConfigJson, context?: string): string[] { let errorCount = []; if (layerJson["overpassTags"] !== undefined) { - errorCount.push("CRIT! Layer ", layerJson.id, "still uses the old 'overpassTags'-format. Please use 'source: {osmTags: }' instead") + errorCount.push("Layer "+ layerJson.id+ "still uses the old 'overpassTags'-format. Please use \"source\": {\"osmTags\": }' instead of \"overpassTags\": (note: this isn't your fault, the custom theme generator still spits out the old format)") } try { const layer = new LayerConfig(layerJson, "test", true) const images = Array.from(layer.ExtractImages()) const remoteImages = images.filter(img => img.indexOf("http") == 0) for (const remoteImage of remoteImages) { - errorCount.push("Found a remote image: " + remoteImage + " in layer " + layer.id) + errorCount.push("Found a remote image: " + remoteImage + " in layer " + layer.id + ", please download it.") + const path = remoteImage.substring(remoteImage.lastIndexOf("/") + ) + linuxHints.push("wget "+remoteImage) + linuxHints.push(`echo '{"path":"${path}", "license": "", "authors": [ "= 0) { writeFileSync("layer_report.txt", errors)