Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a metadata file to the root of the repo that contains info about all the available generators. The contents are populated using the new Makefile target. You can simply run
make
ormake generate
to update the file. It aggregates the metadata of each generator's config file.I was originally going to use a hash of the directory for each generator and store that in the metadata file so that clients can check if their cached version is out of date or not. I decided against this approach for now since it was difficult to standardize hashes between machines, likely in-part due to things like line endings, metadata, and whatnot. Instead, clients will make use of the
version
field for now when comparing their locally cached instance against what is in the repo.As far as downloads go, I wasn't too sure what the best way to deal with them are. You can't easily download a specific directory from a GitHub repo without making heavy use of the github API to walk that directory and download all the files while rebuilding the directory structure locally and the github public API has a limit of 60 requests per hours so that's not a feasible option. For now, clients will just download the individual
generators.json
file to check if they need to update their caches, then download the .zip of the main branch. We could pre-zip each generator directory and store those .zips in the repo but that feels messy/confusing. We could also create an individual release for each generator whenever it changes and store those download URLs for that generator's release in thegenerators.json
file so clients can easily download only the generator they want.