[packager]: Rethink archive link in config.yaml
The hard-coding of a packaged archive in config.yaml is not good. This significantly complicates pushing an upgrade of a font to GF.
Two problems:
- The hard-coded file is version-specific. A newer version can't automatically be reached that way like when we used to link to repos only and the files there could change dynamically and be expected to be up-to-date (until proven otherwise by comparing version numbers). This makes a one-line upgrade akin to
gftools packager "Reem Kufi Fun" ./fontsimpossible. - The
upstream.yamlfiles on GF are incomplete. That was a really bad idea IMO. Now I can't even just take that file, update the archive URL, and then push, because a whole bunch of information is missing that I first need to manually re-collect fromMETADATA.pbbefore I can send a font upgrade.
This all renders the intention of the packager to speed up and streamline the PR process kinda useless.
One possible solution: Use the latest release of a repo by linking to the release URL only: https://github.com/aliftype/reem-kufi/releases/latest (Github conveniently provides this URL for it).
I know that it gets even more complicated as the version is also hard-coded into the file list in config.yaml, but I'm sure that can be overcome somehow as the root folder there seems to correlate with the zip archive’s name.
Thanks for the report and I agree with your 2nd point. This is definitely something that we must improve.
--latest-release deals with this situation. The packager can now grab the latest release and put that archive URL into the metadata. upstream.yaml is dead, dealing with your second point...