Skip to content

Commit 43a2b70

Browse files
committed
Generate taginfo project file
1 parent d3fa305 commit 43a2b70

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

renderer/render_once.sh

+4
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ done
9393
echo 'Waiting for all background jobs to finish'
9494
wait
9595

96+
echo 'Regenerating taginfo project file'
97+
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"
98+
jq -s '.[0].tags += .[1] | .[0]' "$DIR/taginfo_template.json" "$DIR/languages.json" > "$DIR/../static/taginfo.json"
99+
96100
echo 'Invalidating the CDN cache'
97101
aws cloudfront create-invalidation --distribution-id E1SJ64GZNQSV8M --invalidation-batch "{\"Paths\": {\"Quantity\": 1, \"Items\": [\"/*\"]}, \"CallerReference\": \"invalidation-$DATE\"}"
98102

renderer/taginfo_template.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"data_format": 1,
3+
"project": {
4+
"name": "OpenStreetMap U.S. Tile Service",
5+
"description": "A vector tile server for community projects.",
6+
"project_url": "https://github.com/osmus/tileservice/",
7+
"doc_url": "https://tile.ourmap.us/",
8+
"icon_url": "https://openstreetmap.us/img/osmus-logo.svg",
9+
"contact_name": "OpenStreetMap U.S.",
10+
"contact_email": "[email protected]"
11+
},
12+
"tags": [
13+
{"key": "name", "object_types": ["node", "way", "relation", "area"]}
14+
]
15+
}

0 commit comments

Comments
 (0)