summaryrefslogtreecommitdiff
path: root/generator
diff options
context:
space:
mode:
authorJamie Hannaford <jamie.hannaford@rackspace.com>2017-06-07 12:47:28 +0100
committerJamie Hannaford <jamie.hannaford@rackspace.com>2017-06-07 15:27:03 +0100
commitec63dee0af8be6e4461e3295ab28e725ef519c4e (patch)
treedb7cf20b83ad11bd16e3bafd16f7a81f48e08a99 /generator
parentdbc6df544536ecb257a3858ba587aae2b7ad1244 (diff)
Add way to gen one sig
Diffstat (limited to 'generator')
-rw-r--r--generator/README.md9
-rw-r--r--generator/app.go6
2 files changed, 15 insertions, 0 deletions
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