diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 406ba7df..66f53e97 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -78,6 +78,27 @@ jobs: echo "Building snapshot..." ./build.sh + check-docs: + name: check-docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 + - uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a # v3 + with: + go-version-file: './go.mod' + check-latest: true + + - name: generate docs + run: | + go build -o ct-bin ./ct/main.go + ./ct-bin doc-gen + git_status="$(git status --porcelain)" + if [[ ${git_status} ]]; then + echo -e 'Documentation is outdated. Please update the docs\n' + echo "${git_status}" + exit 1 + fi + golangci: name: lint runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index f021794b..2da204f5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /dist /config.* vendor +/ct-bin diff --git a/ct/cmd/root.go b/ct/cmd/root.go index c792c819..ea690041 100644 --- a/ct/cmd/root.go +++ b/ct/cmd/root.go @@ -49,6 +49,8 @@ func NewRootCmd() *cobra.Command { cmd.AddCommand(newVersionCmd()) cmd.AddCommand(newGenerateDocsCmd()) + cmd.DisableAutoGenTag = true + return cmd } diff --git a/doc/ct.md b/doc/ct.md index 3a307c02..375b1402 100644 --- a/doc/ct.md +++ b/doc/ct.md @@ -26,4 +26,3 @@ in given chart directories. * [ct list-changed](ct_list-changed.md) - List changed charts * [ct version](ct_version.md) - Print version information -###### Auto generated by spf13/cobra on 23-Mar-2022 diff --git a/doc/ct_install.md b/doc/ct_install.md index 9263a690..2f666699 100644 --- a/doc/ct_install.md +++ b/doc/ct_install.md @@ -78,4 +78,3 @@ ct install [flags] * [ct](ct.md) - The Helm chart testing tool -###### Auto generated by spf13/cobra on 23-Mar-2022 diff --git a/doc/ct_lint-and-install.md b/doc/ct_lint-and-install.md index 47931947..df4ed9b2 100644 --- a/doc/ct_lint-and-install.md +++ b/doc/ct_lint-and-install.md @@ -77,4 +77,3 @@ ct lint-and-install [flags] * [ct](ct.md) - The Helm chart testing tool -###### Auto generated by spf13/cobra on 23-Mar-2022 diff --git a/doc/ct_lint.md b/doc/ct_lint.md index 3b5fa3d9..c7e5519f 100644 --- a/doc/ct_lint.md +++ b/doc/ct_lint.md @@ -74,4 +74,3 @@ ct lint [flags] * [ct](ct.md) - The Helm chart testing tool -###### Auto generated by spf13/cobra on 23-Mar-2022 diff --git a/doc/ct_list-changed.md b/doc/ct_list-changed.md index 87c8442c..3fa32c03 100644 --- a/doc/ct_list-changed.md +++ b/doc/ct_list-changed.md @@ -32,4 +32,3 @@ ct list-changed [flags] * [ct](ct.md) - The Helm chart testing tool -###### Auto generated by spf13/cobra on 23-Mar-2022 diff --git a/doc/ct_version.md b/doc/ct_version.md index 409e64e9..7e5fc717 100644 --- a/doc/ct_version.md +++ b/doc/ct_version.md @@ -16,4 +16,3 @@ ct version [flags] * [ct](ct.md) - The Helm chart testing tool -###### Auto generated by spf13/cobra on 23-Mar-2022