Skip to content

fix: auto-detect latest Protomaps build URL in download-test-data.sh#2

Open
samuel-yeboah-1 wants to merge 1 commit intoAugani:mainfrom
samuel-yeboah-1:fix/download-test-data-script
Open

fix: auto-detect latest Protomaps build URL in download-test-data.sh#2
samuel-yeboah-1 wants to merge 1 commit intoAugani:mainfrom
samuel-yeboah-1:fix/download-test-data-script

Conversation

@samuel-yeboah-1
Copy link
Copy Markdown

Summary

  • The script had a hardcoded build date (20260315) for the Protomaps planet URL which returned a 404
  • Replaced it with a loop that walks back up to 7 days from today, using a HEAD request to find the first available build
  • Added a clear error message with a link to the builds page if no build is found within the window
  • Handles both macOS (date -v) and Linux (date -d) date syntax

Test plan

  • Run bash scripts/download-test-data.sh on macOS — should print Using build: https://build.protomaps.com/YYYYMMDD.pmtiles and proceed
  • Run on Linux — date fallback path should resolve correctly
  • Confirm that removing the test-data/accra.pmtiles file and re-running triggers a fresh download

🤖 Generated with Claude Code

Replace hardcoded build date in download-test-data.sh with a loop
that walks back up to 7 days from today, checking HEAD requests
until a valid build URL is found. Supports both macOS and Linux
date command syntax.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@samuel-yeboah-1 samuel-yeboah-1 force-pushed the fix/download-test-data-script branch from 722778f to 282a333 Compare March 31, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant