Skip to content

Commit

Permalink
Use instructions with CI
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed May 9, 2020
1 parent 12e91e8 commit 3b8e3f5
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ $ go run *.go \

## Installation

Download the pre-built binaries from release page and copy to your $PATH directory.
Download the pre-built binaries from release page and copy to your $PATH directory. If you are using Go modules, you can install like below:

```console
go get -u kmodules.xyz/[email protected]
```

## How does it work

Expand All @@ -31,3 +35,26 @@ generated values table.

![values example](./images/values-example.png "Example in Description")
![values example preview](./images/values-example-preview.png "Preview Example in Description")

## Use with CI

You can use this tool in CI pipelines to ensure that your chart readme is up-to-date. You can use a Makefile with targets like below:

```console
.PHONY: gen
gen: gen-chart-doc

.PHONY: gen-chart-doc
gen-chart-doc:
@echo "Generate chart docs"
@chart-doc-gen -d=./testdata/doc.yaml -v=./testdata/values.yaml > ./testdata/README.md

.PHONY: verify
verify: verify-gen

.PHONY: verify-gen
verify-gen: gen fmt
@if !(git diff --exit-code HEAD); then \
echo "generated files are out of date, run make gen"; exit 1; \
fi
```

0 comments on commit 3b8e3f5

Please sign in to comment.