Skip to content

sg: ignore config overwrite when generating reference for docs

Warren Gifford requested to merge mrn/sg-generate-overwrite into main

Created by: mrnugget

Finally fixing this after it made me say "ah! oh no" one too many times in the past few weeks.

Here's what previously happened on THORSTEN & SG GENERATE:

  1. Thorsten has a custom commandset named horsegraph in sg.config.overwrite.yaml, along with some other custom commands.
  2. Thorsten creates a database migration/GraphQL schema addition/...
  3. Thorsten runs sg generate
  4. Thorsten commits and pushes commit
  5. Thorsten sees that he pushed commit in which sg's reference in the documentation now contains "horsegraph" as an official commandset to be used with sg start
  6. Thorsten says "ah! oh no" and undoes changes

... multiple times.

So what this does here is introduce a disable-overwrite flag that causes only the standard config to be read.

It's then used in the go:generate directive that runs sg help.

Test plan

  • See steps above. I tested this manually. This PR contains an updated reference (to include -disable-overwrite) but no custom commands.

Merge request reports

Loading