So let’s say that the shields/badges service were inclined to fetch a formula’s JSON data for 3rd party taps. It would be desirable for this JSON data to live in either a central location (as presently with formula.brew.sh) or alternatively, for it to be discoverable by means of a conventional location.
Since it is unlikely that tap owners will want or be able to host separate sites (even via GitHub Pages) simply to make their formulae’ JSON available, a convenient alternative would be for the generated JSON to be committed back into the tap repo itself…
A few alternatives I can see right off the bat:
- commit the JSON file as .json right alongside the formula.rb file (in the Formula directory)
- create a separate directory (Metadata?) alongside the Formula directory
- either 1 or 2, but keeping the json in a wholly separate git branch.
No. 1 is simple and straightforward, but “clutters” up a tap’s Formula directory. This is negligible for most taps that are likely under a few dozen formulae in total.
No. 2 is also fairly straightforward, with the added benefit of being a bit tidier. Also would technically allow users to configure their taps using sparse-checkout in order to avoid having all the JSON files on disk. (very unlikely anyone would do this, though)
No. 3 is the least straightforward but (I believe) has the least potential impact on actual end-users. no extra files would be written to their tap working trees.
Any thoughts regarding any of these approaches or in general?
(relevant GitHub Issue for shields.io: https://github.com/badges/shields/issues/4847 )