Documentation
¶
Overview ¶
Command gen writes the data files of src/data/generated, which the directives of the pages read. With no flag, it writes src/data/generated/schemes.json, the URL schemes of the registry of the release of dburl that go.mod pins. The ::schemes and ::databases directives of the pages read that file (src/lib/schemes.mjs). Run it in the root of the repository after go.mod moves to another release of dburl:
go run ./cmd/gen
A test fails when the file differs from what the program makes. See D7.
With -releases, it fetches the releases of usql from the GitHub API and writes src/data/generated/releases.json, which the ::releases directive reads (src/lib/releases.mjs). Run it after a release of usql:
go run ./cmd/gen -releases
Only -releases uses the network. It sends the token in GITHUB_TOKEN or GH_TOKEN when one is set, so that GitHub allows more requests.