Skip to content

Commit

Permalink
Generate taginfo project file
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Nov 11, 2024
1 parent d3fa305 commit 2329b44
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions renderer/render_once.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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\"}"

Expand Down
15 changes: 15 additions & 0 deletions renderer/taginfo_template.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]"
},
"tags": [
{"key": "name", "object_types": ["node", "way", "relation", "area"]}
]
}

0 comments on commit 2329b44

Please sign in to comment.