6
6
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
7
7
# Changes are relevant to this script and the support docs.mk GNU Make interface.
8
8
#
9
+ # ## 5.4.0 (2024-02-12)
10
+ #
11
+ # ### Changed
12
+ #
13
+ # - Set `WEBSITE_MOUNTS=true` when a user includes the `website` project.
14
+ #
15
+ # Ensures consistent behavior across repositories.
16
+ # To disable website mounts, add `export WEBSITE_MOUNTS := false` to your `variables.mk` or `variables.mk.local` file.
17
+ # - Use website mounts and container volumes also when a user includes the `grafana-cloud` project.
18
+ #
19
+ # ## 5.3.0 (2024-02-08)
20
+ #
21
+ # ### Changed
22
+ #
23
+ # - Updated support for plugins monorepo now that multiple projects have been moved into it.
24
+ # - Use `printf` instead of `echo` for better portability of output.
25
+ #
26
+ # https://www.in-ulm.de/~mascheck/various/echo+printf/
27
+ #
9
28
# ## 5.2.0 (2024-01-18)
10
29
#
11
30
# ### Changed
@@ -197,8 +216,6 @@ readonly DOC_VALIDATOR_SKIP_CHECKS="${DOC_VALIDATOR_SKIP_CHECKS:-^image-}"
197
216
readonly HUGO_REFLINKSERRORLEVEL=" ${HUGO_REFLINKSERRORLEVEL:- WARNING} "
198
217
readonly VALE_MINALERTLEVEL=" ${VALE_MINALERTLEVEL:- error} "
199
218
readonly WEBSITE_EXEC=" ${WEBSITE_EXEC:- make server-docs} "
200
- # If set, the docs-base image will run a prebuild script that sets up Hugo mounts.
201
- readonly WEBSITE_MOUNTS=" ${WEBSITE_MOUNTS:- } "
202
219
203
220
PODMAN=" $( if command -v podman > /dev/null 2>&1 ; then echo podman; else echo docker; fi) "
204
221
@@ -270,10 +287,7 @@ SOURCES_helm_charts_mimir_distributed='mimir'
270
287
SOURCES_helm_charts_tempo_distributed=' tempo'
271
288
SOURCES_opentelemetry=' opentelemetry-docs'
272
289
SOURCES_plugins_grafana_datadog_datasource=' datadog-datasource'
273
- SOURCES_plugins_grafana_jira_datasource=' jira-datasource'
274
- SOURCES_plugins_grafana_mongodb_datasource=' mongodb-datasource'
275
290
SOURCES_plugins_grafana_oracle_datasource=' oracle-datasource'
276
- SOURCES_plugins_grafana_splunk_datasource=' splunk-datasource'
277
291
278
292
VERSIONS_as_code=' UNVERSIONED'
279
293
VERSIONS_grafana_cloud=' UNVERSIONED'
@@ -284,10 +298,7 @@ VERSIONS_grafana_cloud_data_configuration_integrations='UNVERSIONED'
284
298
VERSIONS_grafana_cloud_frontend_observability_faro_web_sdk=' UNVERSIONED'
285
299
VERSIONS_opentelemetry=' UNVERSIONED'
286
300
VERSIONS_plugins_grafana_datadog_datasource=' latest'
287
- VERSIONS_plugins_grafana_jira_datasource=' latest'
288
- VERSIONS_plugins_grafana_mongodb_datasource=' latest'
289
301
VERSIONS_plugins_grafana_oracle_datasource=' latest'
290
- VERSIONS_plugins_grafana_splunk_datasource=' latest'
291
302
VERSIONS_technical_documentation=' UNVERSIONED'
292
303
VERSIONS_website=' UNVERSIONED'
293
304
VERSIONS_writers_toolkit=' UNVERSIONED'
@@ -297,10 +308,7 @@ PATHS_helm_charts_mimir_distributed='docs/sources/helm-charts/mimir-distributed'
297
308
PATHS_helm_charts_tempo_distributed=' docs/sources/helm-charts/tempo-distributed'
298
309
PATHS_mimir=' docs/sources/mimir'
299
310
PATHS_plugins_grafana_datadog_datasource=' docs/sources'
300
- PATHS_plugins_grafana_jira_datasource=' docs/sources'
301
- PATHS_plugins_grafana_mongodb_datasource=' docs/sources'
302
311
PATHS_plugins_grafana_oracle_datasource=' docs/sources'
303
- PATHS_plugins_grafana_splunk_datasource=' docs/sources'
304
312
PATHS_tempo=' docs/sources/tempo'
305
313
PATHS_website=' content'
306
314
@@ -424,7 +432,7 @@ proj_url() {
424
432
$1
425
433
POSIX_HERESTRING
426
434
427
- if [ " ${_project} " = ' website' ]; then
435
+ if [ " ${_project} " = website ]; then
428
436
echo " http://localhost:${DOCS_HOST_PORT} /docs/"
429
437
430
438
unset _project _version
@@ -458,7 +466,7 @@ proj_dst() {
458
466
$1
459
467
POSIX_HERESTRING
460
468
461
- if [ " ${_project} " = ' website' ]; then
469
+ if [ " ${_project} " = website ]; then
462
470
echo ' /hugo/content'
463
471
464
472
unset _project _version
@@ -517,7 +525,7 @@ proj_canonical() {
517
525
$1
518
526
POSIX_HERESTRING
519
527
520
- if [ " ${_project} " = ' website' ]; then
528
+ if [ " ${_project} " = website ]; then
521
529
echo ' /docs'
522
530
523
531
unset _project _version
@@ -586,32 +594,30 @@ await_build() {
586
594
while [ " ${i} " -ne " ${max} " ]
587
595
do
588
596
sleep 1
589
- debg " Retrying request to webserver assuming the process is still starting up."
597
+ debg " Retrying request to web server assuming the process is still starting up."
590
598
i=$(( i + 1 ))
591
599
592
600
if ${req} " ${url} " ; then
593
- echo
594
- echo " View documentation locally:"
601
+ printf ' \r\nView documentation locally:\r\n'
595
602
for x in ${url_src_dst_vers} ; do
596
603
IFS=' ^' read -r url _ _ << POSIX_HERESTRING
597
604
$x
598
605
POSIX_HERESTRING
599
606
600
607
if [ -n " ${url} " ]; then
601
608
if [ " ${_url} " != " arbitrary" ]; then
602
- echo " ${url} "
609
+ printf ' \r %s\r\n ' " ${url} "
603
610
fi
604
611
fi
605
612
done
606
- echo
607
- echo ' Press Ctrl+C to stop the server'
613
+ printf ' \r\nPress Ctrl+C to stop the server\r\n'
608
614
609
615
unset i max req url
610
616
return
611
617
fi
612
618
done
613
619
614
- echo
620
+ printf ' \r\n '
615
621
errr ' The build was interrupted or a build error occurred, check the previous logs for possible causes.'
616
622
note ' You might need to use Ctrl+C to end the process.'
617
623
@@ -620,16 +626,16 @@ POSIX_HERESTRING
620
626
621
627
debg () {
622
628
if [ -n " ${DEBUG} " ]; then
623
- echo " DEBG: $1 " >&2
629
+ printf ' DEBG: %s\r\n ' " $1 " >&2
624
630
fi
625
631
}
626
632
627
633
errr () {
628
- echo " ERRR: $1 " >&2
634
+ printf ' ERRR: %s\r\n ' " $1 " >&2
629
635
}
630
636
631
637
note () {
632
- echo " NOTE: $1 " >&2
638
+ printf ' NOTE: %s\r\n ' " $1 " >&2
633
639
}
634
640
635
641
url_src_dst_vers=" $( url_src_dst_vers " $@ " ) "
@@ -641,9 +647,16 @@ for arg in "$@"; do
641
647
IFS=: read -r _project _ _repo _ << POSIX_HERESTRING
642
648
${arg}
643
649
POSIX_HERESTRING
644
- if [ " ${_project} " = website ]; then
650
+ if [ " ${_project} " = website ] || [ " ${_project} " = grafana-cloud ] ; then
645
651
note " Please be patient, building the website can take some time."
646
652
653
+ # If set, the docs-base image will run a prebuild script that sets up Hugo mounts.
654
+ if [ " ${WEBSITE_MOUNTS} " = false ]; then
655
+ unset WEBSITE_MOUNTS
656
+ else
657
+ readonly WEBSITE_MOUNTS=true
658
+ fi
659
+
647
660
_repo=" $( repo_path website) "
648
661
volumes=" --volume=${_repo} /config:/hugo/config"
649
662
volumes=" ${volumes} --volume=${_repo} /layouts:/hugo/layouts"
@@ -690,7 +703,7 @@ POSIX_HERESTRING
690
703
case " ${image} " in
691
704
' grafana/doc-validator' )
692
705
proj=" $( new_proj " $1 " ) "
693
- echo
706
+ printf ' \r\n '
694
707
" ${PODMAN} " run \
695
708
--init \
696
709
--interactive \
@@ -706,7 +719,7 @@ case "${image}" in
706
719
;;
707
720
' grafana/vale' )
708
721
proj=" $( new_proj " $1 " ) "
709
- echo
722
+ printf ' \r\n '
710
723
" ${PODMAN} " run \
711
724
--init \
712
725
--interactive \
0 commit comments