## Description
<!-- **Please link some issue here describing what you are trying to achieve.**
In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->
relates to #1234
## Checklist
- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)
Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
22 lines
586 B
Bash
Executable file
22 lines
586 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
|
|
# This script is used to ensure for PRs the docs are up-to-date via the CI pipeline
|
|
# Usage: ./check-docs.sh
|
|
set -eo pipefail
|
|
|
|
ROOT_DIR=$(git rev-parse --show-toplevel)
|
|
|
|
before_hash=$(find docs -type f -exec sha256sum {} \; | sort | sha256sum | awk '{print $1}')
|
|
|
|
# re-generate the docs
|
|
"${ROOT_DIR}/scripts/tfplugindocs.sh"
|
|
|
|
after_hash=$(find docs -type f -exec sha256sum {} \; | sort | sha256sum | awk '{print $1}')
|
|
|
|
if [[ "$before_hash" == "$after_hash" ]]; then
|
|
echo "Docs are up-to-date"
|
|
else
|
|
echo "Changes detected. Docs are *not* up-to-date."
|
|
exit 1
|
|
fi
|