diff --git a/renderer/render_once.sh b/renderer/render_once.sh index b975c9d..178b90a 100755 --- a/renderer/render_once.sh +++ b/renderer/render_once.sh @@ -93,6 +93,10 @@ done echo 'Waiting for all background jobs to finish' wait +echo 'Regenerating taginfo project file' +cat "$DIR/languages.txt" | sed -E 's/([-A-Za-z]+)/{"key": "name:\1", "object_types": ["node", "way", "relation", "area"]}/g' | jq -s '.' > "$DIR/languages.json" +jq -s '.[0].tags += .[1] | .[0]' "$DIR/taginfo_template.json" "$DIR/languages.json" > "$DIR/../static/taginfo.json" + echo 'Invalidating the CDN cache' aws cloudfront create-invalidation --distribution-id E1SJ64GZNQSV8M --invalidation-batch "{\"Paths\": {\"Quantity\": 1, \"Items\": [\"/*\"]}, \"CallerReference\": \"invalidation-$DATE\"}" diff --git a/renderer/taginfo_template.json b/renderer/taginfo_template.json new file mode 100644 index 0000000..a55dbb4 --- /dev/null +++ b/renderer/taginfo_template.json @@ -0,0 +1,15 @@ +{ + "data_format": 1, + "project": { + "name": "OpenStreetMap U.S. Tile Service", + "description": "A vector tile server for community projects.", + "project_url": "https://github.com/osmus/tileservice/", + "doc_url": "https://tile.ourmap.us/", + "icon_url": "https://openstreetmap.us/img/osmus-logo.svg", + "contact_name": "OpenStreetMap U.S.", + "contact_email": "team@openstreetmap.us" + }, + "tags": [ + {"key": "name", "object_types": ["node", "way", "relation", "area"]} + ] +}