diff --git a/Makefile b/Makefile index c39e03a00..2db0ba0bd 100644 --- a/Makefile +++ b/Makefile @@ -35,8 +35,9 @@ schema: @go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json docs: - @echo "✓ Generating docs ..." + @echo "✓ Generating docs using ./bundle/internal/schema/annotations.yml file..." @go run ./bundle/internal/docs ./bundle/internal/schema ./bundle/internal/docs/docs.md + @echo "✓ Writing docs to ./bundle/internal/docs/docs.md" INTEGRATION = gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./integration/..." -- -parallel 4 -timeout=2h diff --git a/bundle/internal/docs/README.md b/bundle/internal/docs/README.md new file mode 100644 index 000000000..77d9abcad --- /dev/null +++ b/bundle/internal/docs/README.md @@ -0,0 +1,7 @@ +## docs-autogen + +1. Install [Golang](https://go.dev/doc/install) +2. Run `go mod download` from the repo root +3. Run `make docs` from the repo +4. See generated document in `./bundle/internal/docs/docs.md` +5. To change descriptions update content in `./bundle/internal/schema/annotations.yml` and re-run `make docs` diff --git a/go.mod b/go.mod index d99934422..33a6bed75 100644 --- a/go.mod +++ b/go.mod @@ -33,6 +33,8 @@ require ( gopkg.in/yaml.v3 v3.0.1 ) +require github.com/nao1215/markdown v0.6.0 + require ( cloud.google.com/go/auth v0.4.2 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect @@ -56,10 +58,8 @@ require ( github.com/karrick/godirwalk v1.17.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/nao1215/markdown v0.6.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/radovskyb/watcher v1.0.7 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/zclconf/go-cty v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect diff --git a/go.sum b/go.sum index e0b58c4f1..a923b6e05 100644 --- a/go.sum +++ b/go.sum @@ -144,8 +144,6 @@ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzL github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/radovskyb/watcher v1.0.7 h1:AYePLih6dpmS32vlHfhCeli8127LzkIgwJGcwwe8tUE= -github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=