mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
Update versions in README.md with pre-commit
Currently, versions in README.md need to be manually updated, and we check it's done with a bash script. Add a small utility playbook to add versions in README.md from their actual default values, automatically. This is done in pre-commit, and replace the scripted check ; instead it will autofix the README.md, and fails in CI if needed. We switch markdownlint behind the local hooks to gave it the opportunity to catch a problem with the rendering.
This commit is contained in:
@@ -20,12 +20,6 @@ repos:
|
||||
- id: yamllint
|
||||
args: [--strict]
|
||||
|
||||
- repo: https://github.com/markdownlint/markdownlint
|
||||
rev: v0.12.0
|
||||
hooks:
|
||||
- id: markdownlint
|
||||
exclude: "^.github|(^docs/_sidebar\\.md$)"
|
||||
|
||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
rev: v0.10.0.1
|
||||
hooks:
|
||||
@@ -51,12 +45,6 @@ repos:
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: check-readme-versions
|
||||
name: check-readme-versions
|
||||
entry: tests/scripts/check_readme_versions.sh
|
||||
language: script
|
||||
pass_filenames: false
|
||||
|
||||
- id: collection-build-install
|
||||
name: Build and install kubernetes-sigs.kubespray Ansible collection
|
||||
language: python
|
||||
@@ -90,3 +78,17 @@ repos:
|
||||
- jinja
|
||||
additional_dependencies:
|
||||
- jinja2
|
||||
|
||||
- id: render-readme-versions
|
||||
name: Update versions in README.md to match their defaults values
|
||||
language: python
|
||||
additional_dependencies:
|
||||
- ansible-core>=2.16.4
|
||||
entry: scripts/render_readme_version.yml
|
||||
pass_filenames: false
|
||||
|
||||
- repo: https://github.com/markdownlint/markdownlint
|
||||
rev: v0.12.0
|
||||
hooks:
|
||||
- id: markdownlint
|
||||
exclude: "^.github|(^docs/_sidebar\\.md$)"
|
||||
|
||||
Reference in New Issue
Block a user