mirror of
https://github.com/grafana/grafana.git
synced 2025-02-03 12:11:09 -06:00
Update make docs
procedure (#82342)
Co-authored-by: grafanabot <bot@grafana.com>
This commit is contained in:
parent
3909b4c14a
commit
8a90c0f868
@ -6,6 +6,15 @@
|
||||
# [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.
|
||||
#
|
||||
# ## 5.4.0 (2024-02-12)
|
||||
#
|
||||
# ### Changed
|
||||
#
|
||||
# - Set `WEBSITE_MOUNTS=true` when a user includes the `website` project.
|
||||
#
|
||||
# Ensures consistent behavior across repositories.
|
||||
# To disable website mounts, add `export WEBSITE_MOUNTS := false` to your `variables.mk` or `variables.mk.local` file.
|
||||
# - Use website mounts and container volumes also when a user includes the `grafana-cloud` project.
|
||||
#
|
||||
# ## 5.3.0 (2024-02-08)
|
||||
#
|
||||
@ -207,8 +216,6 @@ readonly DOC_VALIDATOR_SKIP_CHECKS="${DOC_VALIDATOR_SKIP_CHECKS:-^image-}"
|
||||
readonly HUGO_REFLINKSERRORLEVEL="${HUGO_REFLINKSERRORLEVEL:-WARNING}"
|
||||
readonly VALE_MINALERTLEVEL="${VALE_MINALERTLEVEL:-error}"
|
||||
readonly WEBSITE_EXEC="${WEBSITE_EXEC:-make server-docs}"
|
||||
# If set, the docs-base image will run a prebuild script that sets up Hugo mounts.
|
||||
readonly WEBSITE_MOUNTS="${WEBSITE_MOUNTS:-}"
|
||||
|
||||
PODMAN="$(if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi)"
|
||||
|
||||
@ -425,7 +432,7 @@ proj_url() {
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ "${_project}" = 'website' ]; then
|
||||
if [ "${_project}" = website ]; then
|
||||
echo "http://localhost:${DOCS_HOST_PORT}/docs/"
|
||||
|
||||
unset _project _version
|
||||
@ -459,7 +466,7 @@ proj_dst() {
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ "${_project}" = 'website' ]; then
|
||||
if [ "${_project}" = website ]; then
|
||||
echo '/hugo/content'
|
||||
|
||||
unset _project _version
|
||||
@ -518,7 +525,7 @@ proj_canonical() {
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ "${_project}" = 'website' ]; then
|
||||
if [ "${_project}" = website ]; then
|
||||
echo '/docs'
|
||||
|
||||
unset _project _version
|
||||
@ -587,7 +594,7 @@ await_build() {
|
||||
while [ "${i}" -ne "${max}" ]
|
||||
do
|
||||
sleep 1
|
||||
debg "Retrying request to webserver assuming the process is still starting up."
|
||||
debg "Retrying request to web server assuming the process is still starting up."
|
||||
i=$((i + 1))
|
||||
|
||||
if ${req} "${url}"; then
|
||||
@ -640,9 +647,16 @@ for arg in "$@"; do
|
||||
IFS=: read -r _project _ _repo _ <<POSIX_HERESTRING
|
||||
${arg}
|
||||
POSIX_HERESTRING
|
||||
if [ "${_project}" = website ]; then
|
||||
if [ "${_project}" = website ] || [ "${_project}" = grafana-cloud ]; then
|
||||
note "Please be patient, building the website can take some time."
|
||||
|
||||
# If set, the docs-base image will run a prebuild script that sets up Hugo mounts.
|
||||
if [ "${WEBSITE_MOUNTS}" = false ]; then
|
||||
unset WEBSITE_MOUNTS
|
||||
else
|
||||
readonly WEBSITE_MOUNTS=true
|
||||
fi
|
||||
|
||||
_repo="$(repo_path website)"
|
||||
volumes="--volume=${_repo}/config:/hugo/config"
|
||||
volumes="${volumes} --volume=${_repo}/layouts:/hugo/layouts"
|
||||
|
Loading…
Reference in New Issue
Block a user