[v10.2.x] Update make docs procedure (#83051)
Co-authored-by: grafanabot <bot@grafana.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
grafanabot
github-actions[bot]
parent
32806a8808
commit
75ae6b0ef5
+17
-2
@@ -6,6 +6,12 @@
|
|||||||
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
|
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
|
||||||
# Changes are relevant to this script and the support docs.mk GNU Make interface.
|
# Changes are relevant to this script and the support docs.mk GNU Make interface.
|
||||||
#
|
#
|
||||||
|
# ## 6.0.0 (2024-02-16)
|
||||||
|
#
|
||||||
|
# ### Changed
|
||||||
|
#
|
||||||
|
# - Require `jq` for human readable `make doc-validator` output.
|
||||||
|
#
|
||||||
# ## 5.4.0 (2024-02-12)
|
# ## 5.4.0 (2024-02-12)
|
||||||
#
|
#
|
||||||
# ### Changed
|
# ### Changed
|
||||||
@@ -702,6 +708,13 @@ POSIX_HERESTRING
|
|||||||
|
|
||||||
case "${image}" in
|
case "${image}" in
|
||||||
'grafana/doc-validator')
|
'grafana/doc-validator')
|
||||||
|
if ! command -v jq >/dev/null 2>&1; then
|
||||||
|
errr '`jq` must be installed for the `doc-validator` target to work.'
|
||||||
|
note 'To install `jq`, refer to https://jqlang.github.io/jq/download/,'
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
proj="$(new_proj "$1")"
|
proj="$(new_proj "$1")"
|
||||||
printf '\r\n'
|
printf '\r\n'
|
||||||
"${PODMAN}" run \
|
"${PODMAN}" run \
|
||||||
@@ -714,8 +727,10 @@ case "${image}" in
|
|||||||
"${DOCS_IMAGE}" \
|
"${DOCS_IMAGE}" \
|
||||||
"--include=${DOC_VALIDATOR_INCLUDE}" \
|
"--include=${DOC_VALIDATOR_INCLUDE}" \
|
||||||
"--skip-checks=${DOC_VALIDATOR_SKIP_CHECKS}" \
|
"--skip-checks=${DOC_VALIDATOR_SKIP_CHECKS}" \
|
||||||
/hugo/content/docs \
|
"/hugo/content$(proj_canonical "${proj}")" \
|
||||||
"$(proj_canonical "${proj}")" | sed "s#$(proj_dst "${proj}")#sources#"
|
"$(proj_canonical "${proj}")" \
|
||||||
|
| sed "s#$(proj_dst "${proj}")#sources#" \
|
||||||
|
| jq -r '"ERROR: \(.location.path):\(.location.range.start.line // 1):\(.location.range.start.column // 1): \(.message)" + if .suggestions[0].text then "\nSuggestion: \(.suggestions[0].text)" else "" end'
|
||||||
;;
|
;;
|
||||||
'grafana/vale')
|
'grafana/vale')
|
||||||
proj="$(new_proj "$1")"
|
proj="$(new_proj "$1")"
|
||||||
|
|||||||
Reference in New Issue
Block a user