Add way to gen one sig

This commit is contained in:
Jamie Hannaford 2017-06-07 12:47:28 +01:00
parent dbc6df5445
commit ec63dee0af
3 changed files with 22 additions and 4 deletions

View File

@ -1,12 +1,15 @@
all: \ all: \
build-sigdocs \ build-image \
run-sigdocs \ gen-docs \
reset-docs: reset-docs:
git checkout HEAD -- sig-list.md sig-* git checkout HEAD -- sig-list.md sig-*
build-sigdocs: build-image:
docker build -t sigdocs -f generator/Dockerfile generator 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 docker run -v $(shell pwd):/go/src/app sigdocs

View File

@ -17,6 +17,15 @@ To (re)build documentation for all the SIGs, run these commands:
make all 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 ## Adding custom content to your SIG's README
If your SIG wishes to add custom content, you can do so by placing it within If your SIG wishes to add custom content, you can do so by placing it within

View File

@ -179,9 +179,15 @@ func writeLastGenerated(f *os.File) {
} }
func createReadmeFiles(ctx SigEntries) error { func createReadmeFiles(ctx SigEntries) error {
selectedSig := os.Getenv("SIG")
for _, sig := range ctx.Sigs { for _, sig := range ctx.Sigs {
dirName := fmt.Sprintf("sig-%s", strings.ToLower(strings.Replace(sig.Name, " ", "-", -1))) 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) createDirIfNotExists(dirName)
prefix := sig.Contact.GithubTeamPrefix prefix := sig.Contact.GithubTeamPrefix