Closed sebastianbenz closed 4 years ago
If you're very unlucky and start this process in the middle of a deployment, https://cdn.ampproject.org/files.txt
might not match what's actually available on the server. (Or e.g. v0.js
and amp-auto-lightbox-0.1.js
might belong to different versions.)
To avoid this, perhaps downloading the "latest" release should actually first fetch https://cdn.ampproject.org/version.txt
, and then download a specific version based on whatever it says is the latest.
As a heads up, I've started work on this feature: https://github.com/mdmower/amp-toolbox/commits/pr-download
It works, but does not have documentation yet.
Examples:
Approach:
https://cdn.ampproject.org/files.txt
/[a-zA-Z]{2} {26}/
and replace with string{{AMP_ISO_COUNTRY_HOTPATCH}}
.