diff options
| author | Jamie Hannaford <jamie.hannaford@rackspace.com> | 2017-06-07 12:47:28 +0100 |
|---|---|---|
| committer | Jamie Hannaford <jamie.hannaford@rackspace.com> | 2017-06-07 15:27:03 +0100 |
| commit | ec63dee0af8be6e4461e3295ab28e725ef519c4e (patch) | |
| tree | db7cf20b83ad11bd16e3bafd16f7a81f48e08a99 | |
| parent | dbc6df544536ecb257a3858ba587aae2b7ad1244 (diff) | |
Add way to gen one sig
| -rw-r--r-- | Makefile | 11 | ||||
| -rw-r--r-- | generator/README.md | 9 | ||||
| -rw-r--r-- | generator/app.go | 6 |
3 files changed, 22 insertions, 4 deletions
@@ -1,12 +1,15 @@ all: \ - build-sigdocs \ - run-sigdocs \ + build-image \ + gen-docs \ reset-docs: git checkout HEAD -- sig-list.md sig-* -build-sigdocs: +build-image: docker build -t sigdocs -f generator/Dockerfile generator -run-sigdocs: +gen-doc: + docker run -e SIG=${SIG} -v $(shell pwd):/go/src/app sigdocs + +gen-docs: docker run -v $(shell pwd):/go/src/app sigdocs diff --git a/generator/README.md b/generator/README.md index d0333c97..94d2af5b 100644 --- a/generator/README.md +++ b/generator/README.md @@ -17,6 +17,15 @@ To (re)build documentation for all the SIGs, run these commands: make all ``` +To build docs for one SIG, run these commands: + +```bash +make SIG=sig-apps gen-doc +make SIG=sig-testing gen-doc +``` + +where the `SIG` var refers to the directory being built. + ## Adding custom content to your SIG's README If your SIG wishes to add custom content, you can do so by placing it within diff --git a/generator/app.go b/generator/app.go index e6335b0a..1ece9685 100644 --- a/generator/app.go +++ b/generator/app.go @@ -179,9 +179,15 @@ func writeLastGenerated(f *os.File) { } func createReadmeFiles(ctx SigEntries) error { + selectedSig := os.Getenv("SIG") for _, sig := range ctx.Sigs { dirName := fmt.Sprintf("sig-%s", strings.ToLower(strings.Replace(sig.Name, " ", "-", -1))) + if selectedSig != "" && selectedSig != dirName { + fmt.Printf("Skipping %s\n", dirName) + continue + } + createDirIfNotExists(dirName) prefix := sig.Contact.GithubTeamPrefix |
