Update `make docs` procedure (#74306)

Co-authored-by: grafanabot <bot@grafana.com>
pull/74506/head
github-actions[bot] 2 years ago committed by GitHub
parent bccb5869a5
commit 790b168c85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 54
      docs/make-docs

@ -6,6 +6,13 @@
# [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.
# ## 4.2.0 (2023-09-01)
# ### Added
# - Retry the initial webserver request up to ten times to allow for the process to start.
# If it is still failing after ten seconds, an error message is logged.
# ## 4.1.1 (2023-07-20)
# ### Fixed
@ -439,30 +446,39 @@ await_build() {
url="$1"
req="$(if command -v curl >/dev/null 2>&1; then echo 'curl -s -o /dev/null'; else echo 'wget -q'; fi)"
sleep 2
if ${req} "${url}"; then
echo
echo "View documentation locally:"
for x in ${url_src_dst_vers}; do
IFS='^' read -r url _ _ <<POSIX_HERESTRING
i=1
max=10
while [ "${i}" -ne "${max}" ]
do
sleep 1
debg "Retrying request to webserver assuming the process is still starting up."
i=$((i + 1))
if ${req} "${url}"; then
echo
echo "View documentation locally:"
for x in ${url_src_dst_vers}; do
IFS='^' read -r url _ _ <<POSIX_HERESTRING
$x
POSIX_HERESTRING
if [ -n "${url}" ]; then
if [ "${_url}" != "arbitrary" ]; then
echo " ${url}"
if [ -n "${url}" ]; then
if [ "${_url}" != "arbitrary" ]; then
echo " ${url}"
fi
fi
fi
done
echo
echo 'Press Ctrl+C to stop the server'
else
echo
errr 'The build was interrupted or a build error occurred, check the previous logs for possible causes.'
fi
done
echo
echo 'Press Ctrl+C to stop the server'
unset i max req url
return
fi
done
unset url req
echo
errr 'The build was interrupted or a build error occurred, check the previous logs for possible causes.'
unset i max req url
}
debg() {

Loading…
Cancel
Save