diff --git a/utils/cronjobs_osgeo_lxd/cron_grass_current_stable_build_binaries.sh b/utils/cronjobs_osgeo_lxd/cron_grass_current_stable_build_binaries.sh
index 6621eca26b..a8a966c97a 100755
--- a/utils/cronjobs_osgeo_lxd/cron_grass_current_stable_build_binaries.sh
+++ b/utils/cronjobs_osgeo_lxd/cron_grass_current_stable_build_binaries.sh
@@ -11,17 +11,14 @@
# - configures source code and then compiles it
# - packages the binaries
# - generated the install scripts
-# - generates the pyGRASS 8 HTML manual
-# - generates the user 8 HTML manuals
-# - injects DuckDuckGo search field
+# - note: the mkdocs based HTML manual pages are generated by GitHub Action
# - copies over generated manual pages to grass-stable/manuals/
# - injects in versioned manual the "canonical" to point to "stable" manual (as seen in the Python manual pages)
# Preparations, on server (neteler@grasslxd:$):
+# - git clone the correct GRASS source code version into $HOME/src/
# - install dependencies:
# cd $HOME/src/releasebranch_8_5/ && git pull && sudo apt install $(cat .github/workflows/apt.txt)
-# - install further dependencies (not needed for mkdocs used in G85+):
-# apt-get install texlive-latex-extra python3-sphinxcontrib.apidoc
# - run this script
# - one time only: cross-link code into web space on grasslxd server:
# cd /var/www/html/
@@ -159,38 +156,9 @@ echo "GRASS $VERSION compilation done"
######## now GRASS GIS binaries are prepared ####################
-#### create module overview (https://trac.osgeo.org/grass/ticket/1203)
-#sh utils/module_synopsis.sh
-
-#### generate developer stuff: pygrass docs + gunittest docs
-# generate pyGRASS sphinx manual (in docs/html/libpython/)
-# including source code
-$MYMAKE sphinxdoclib
-
-##
-echo "Copy over the manual + pygrass HTML pages:"
-mkdir -p $TARGETHTMLDIR
-mkdir -p $TARGETHTMLDIR/addons # indeed only relevant the very first compile time
-# don't destroy the addons during update
-rm -rf /tmp/addons
-\mv $TARGETHTMLDIR/addons /tmp
-rm -f $TARGETHTMLDIR/*.*
-(cd $TARGETHTMLDIR ; rm -rf barscales colortables icons northarrows)
-\mv /tmp/addons $TARGETHTMLDIR
-
-cp -rp dist.$ARCH/docs/html/* $TARGETHTMLDIR/
-echo "Copied pygrass progman to https://grass.osgeo.org/grass${VERSION}/manuals/libpython/"
-
-# search to be improved with mkdocs or similar; for now we use DuckDuckGo
-echo "Injecting DuckDuckGo search field into manual main page..."
-(cd $TARGETHTMLDIR/ ; sed -i -e "s++<\!\-\- injected in cron_grass8_relbranch_build_binaries.sh \-\->
+g" index.html)
-
# copy important files to web space
cp -p AUTHORS CITING CITATION.cff COPYING GPL.TXT INSTALL.md REQUIREMENTS.md $TARGETDIR/
-# clean wxGUI sphinx manual etc
-(cd $GRASSBUILDDIR/ ; $MYMAKE cleansphinx)
-
############
# generate doxygen programmers's G8 manual
cd $GRASSBUILDDIR/
@@ -199,26 +167,7 @@ $MYMAKE htmldocs-single || (echo "$0 htmldocs-single: an error occurred" ; exit
cd $GRASSBUILDDIR/
-#### unused, programmer's manual is only built in "preview" script
-## clean old TARGETPROGMAN stuff from last run
-#if [ -z "$TARGETPROGMAN" ] ; then
-# echo "\$TARGETPROGMAN undefined, error!"
-# exit 1
-#fi
-#mkdir -p $TARGETPROGMAN
-#rm -f $TARGETPROGMAN/*.*
-#
-## copy over doxygen manual
-#cp -r html/* $TARGETPROGMAN/
-#
-#echo "Copied HTML progman to https://grass.osgeo.org/programming${GVERSION}"
-## fix permissions
-#chgrp -R grass $TARGETPROGMAN/*
-#chmod -R a+r,g+w $TARGETPROGMAN/
-#chmod -R a+r,g+w $TARGETPROGMAN/*
-## bug in doxygen
-#(cd $TARGETPROGMAN/ ; ln -s index.html main.html)
-#### end unused
+#### programmer's manual is only built in "preview" script
##### generate i18N stats for HTML page path:
# note: the gettext POT files are managed in git and OSGeo Weblate
@@ -238,9 +187,10 @@ cd $TARGETDIR/
cat i18n_stats.txt | grep mod > i18n_stats_mods.txt
cat i18n_stats.txt | grep lib > i18n_stats_libs.txt
cat i18n_stats.txt | grep wxpy > i18n_stats_wxpy.txt
-cd $GRASSBUILDDIR
+############
# package the GRASS GIS package
+cd $GRASSBUILDDIR
$MYMAKE bindist
if [ $? -ne 0 ] ; then
halt_on_error "make bindist."
@@ -279,8 +229,7 @@ cd $GRASSBUILDDIR
############################################
# compile addons
-# update addon repo (addon repo has been cloned twice on the server to
-# have separate grass7 and grass8 addon compilation)
+# update addon repo
(cd $SOURCE/grass$GMAJOR-addons/; git checkout grass$GMAJOR; git pull origin grass$GMAJOR)
# compile addons
cd $GRASSBUILDDIR
@@ -291,30 +240,11 @@ sh $MAINDIR/cronjobs/compile_addons_git.sh $GMAJOR \
$MAINDIR/.grass$GMAJOR/addons \
$SOURCE/$BRANCH/bin.$ARCH/grass \
1
-mkdir -p $TARGETHTMLDIR/addons/
-# copy individual addon html files into one target dir if compiled addon
-# has own dir e.g. $MAINDIR/.grass8/addons/db.join/ with bin/ docs/ etc/ scripts/
-# subdir
-for dir in `find $MAINDIR/.grass$GMAJOR/addons -maxdepth 1 -type d`; do
- if [ -d $dir/docs/html ] ; then
- if [ "$(ls -A $dir/docs/html/)" ]; then
- for f in $dir/docs/html/*; do
- # TODO: in cron_grass_preview_build_binaries.sh this is skipped. What is right?
- cp $f $TARGETHTMLDIR/addons/
- done
- fi
- fi
-done
-
-# TODO: still needed for new mkdocs based manual pages?
-sh $MAINDIR/cronjobs/grass-addons-index.sh $GMAJOR $GMINOR $GPATCH $TARGETHTMLDIR/addons/
-# copy over hamburger menu assets
-cp $TARGETHTMLDIR/grass_logo.png \
- $TARGETHTMLDIR/hamburger_menu.svg \
- $TARGETHTMLDIR/hamburger_menu_close.svg \
- $TARGETHTMLDIR/grassdocs.css \
- $TARGETHTMLDIR/addons/
-chmod -R a+r,g+w $TARGETHTMLDIR 2> /dev/null
+
+### fetch manual from GH actions
+# fetch artifacts for releasebranch_8_X (stable)
+bash $HOME/cronjobs/gh_cli_download_artifact.sh $BRANCH
+unzip -t /tmp/mkdocs-site_$BRANCH.zip && cd $TARGETHTMLDIR && rm -rf * && unzip -q /tmp/mkdocs-site_$BRANCH.zip && rm -f /tmp/mkdocs-site_$BRANCH.zip
# copy over logs from $MAINDIR/.grass$GMAJOR/addons/logs/
mkdir -p $TARGETMAIN/addons/grass$GMAJOR/logs/
@@ -324,28 +254,15 @@ cp -p $MAINDIR/.grass$GMAJOR/addons/logs/* $TARGETMAIN/addons/grass$GMAJOR/logs/
$SOURCE/$BRANCH/bin.$ARCH/grass --tmp-project EPSG:4326 --exec $MAINDIR/cronjobs/build-xml.py --build $MAINDIR/.grass$GMAJOR/addons
cp $MAINDIR/.grass$GMAJOR/addons/modules.xml $TARGETMAIN/addons/grass$GMAJOR/modules.xml
-# regenerate keywords.html file with addons modules keywords
-export ARCH
-export ARCH_DISTDIR=$GRASSBUILDDIR/dist.$ARCH
-export GISBASE=$ARCH_DISTDIR
-export VERSION_NUMBER=$DOTVERSION
-python3 $GRASSBUILDDIR/man/build_keywords.py $TARGETMAIN/grass$GMAJOR$GMINOR/manuals/ $TARGETMAIN/grass$GMAJOR$GMINOR/manuals/addons/
-unset ARCH ARCH_DISTDIR GISBASE VERSION_NUMBER
-
############################################
# Cloning new manual pages into grass-stable/manuals/ (following the Python manual pages concept)
# - inject canonical URL therein to point to versioned manual page (avoiding "duplicate content" SEO punishment)
# see https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
TARGETHTMLDIRSTABLE=$TARGETMAIN/grass-stable/manuals/
-mkdir -p $TARGETHTMLDIRSTABLE $TARGETHTMLDIRSTABLE/addons
-# cleanup from previous run
-rm -rf /tmp/addons
-\mv $TARGETHTMLDIRSTABLE/addons /tmp
-rm -f $TARGETHTMLDIRSTABLE/*.*
-(cd $TARGETHTMLDIRSTABLE ; rm -rf barscales colortables icons northarrows)
# clone manual pages
-cp -rp $TARGETHTMLDIR/* $TARGETHTMLDIRSTABLE/
+rm -rf $TARGETHTMLDIRSTABLE
+rsync -a $TARGETHTMLDIR/ $TARGETHTMLDIRSTABLE/
############################################
# SEO: inject canonical link into versioned manual pages (e.g, grass85/)
@@ -374,20 +291,12 @@ process_files "$TARGETHTMLDIR/libpython" "libpython/"
# SEO: "stable" manual pages (grass-stable/) is using canonical link
############################################
-# create sitemaps to expand the hugo sitemap
-
-# versioned manual:
-python3 $HOME/src/grass$GMAJOR-addons/utils/create_manuals_sitemap.py --dir=/var/www/code_and_data/grass$GMAJOR$GMINOR/manuals/ --url=https://grass.osgeo.org/grass$GMAJOR$GMINOR/manuals/ -o
-python3 $HOME/src/grass$GMAJOR-addons/utils/create_manuals_sitemap.py --dir=/var/www/code_and_data/grass$GMAJOR$GMINOR/manuals/addons/ --url=https://grass.osgeo.org/grass$GMAJOR$GMINOR/manuals/addons/ -o
-
-# grass-stable manual:
-python3 $HOME/src/grass$GMAJOR-addons/utils/create_manuals_sitemap.py --dir=/var/www/code_and_data/grass-stable/manuals/ --url=https://grass.osgeo.org/grass-stable/manuals/ -o
-python3 $HOME/src/grass$GMAJOR-addons/utils/create_manuals_sitemap.py --dir=/var/www/code_and_data/grass-stable/manuals/addons/ --url=https://grass.osgeo.org/grass-stable/manuals/addons/ -o
+# sitemaps to expand the hugo sitemap is generated by mkdocs GHA job
############################################
# cleanup
cd $GRASSBUILDDIR
-$MYMAKE distclean > /dev/null || (echo "$0: an error occurred" ; exit 1)
+$MYMAKE distclean > /dev/null 2>&1 || (echo "$0: an error occurred in final distclean" ; exit 1)
rm -rf lib/html/ lib/latex/ /tmp/addons
echo "Finished GRASS $VERSION $ARCH compilation."
diff --git a/utils/cronjobs_osgeo_lxd/cron_grass_legacy_build_binaries.sh b/utils/cronjobs_osgeo_lxd/cron_grass_legacy_build_binaries.sh
index 300a726dc0..809b501a3e 100755
--- a/utils/cronjobs_osgeo_lxd/cron_grass_legacy_build_binaries.sh
+++ b/utils/cronjobs_osgeo_lxd/cron_grass_legacy_build_binaries.sh
@@ -17,10 +17,12 @@
# - injects in versioned manual the "canonical" to point to "stable" manual (as seen in the Python manual pages)
# Preparations, on server (neteler@grasslxd:$):
+# - git clone the correct GRASS source code version into $HOME/src/
# - install dependencies:
# cd $HOME/src/releasebranch_7_8/ && git pull && sudo apt install $(cat .github/workflows/apt.txt)
# - install further dependencies:
-# apt-get install texlive-latex-extra python3-sphinxcontrib.apidoc
+# apt-get install texlive-latex-extra python3-sphinxcontrib.apidoc python3-sphinx-sitemap
+# pip install sphinx-last-updated-by-git sphinx_material --break-system-packages # to avoid virtenv
# - run this script
# - one time only: cross-link code into web space on grasslxd server:
# cd /var/www/html/
@@ -161,7 +163,7 @@ echo "GRASS $VERSION compilation done"
#sh utils/module_synopsis.sh
#### generate developer stuff: pygrass docs + gunittest docs
-# generate pyGRASS sphinx manual (in docs/html/libpython/)
+# generate pyGRASS sphinx manual (in python/grass/docs/)
# including source code
$MYMAKE sphinxdoclib
diff --git a/utils/cronjobs_osgeo_lxd/cron_grass_old_build_binaries.sh b/utils/cronjobs_osgeo_lxd/cron_grass_old_build_binaries.sh
index 54d61e2af4..6de84b920c 100755
--- a/utils/cronjobs_osgeo_lxd/cron_grass_old_build_binaries.sh
+++ b/utils/cronjobs_osgeo_lxd/cron_grass_old_build_binaries.sh
@@ -23,10 +23,12 @@ exit 0
# - injects in versioned manual the "canonical" to point to "stable" manual (as seen in the Python manual pages)
# Preparations, on server (neteler@grasslxd:$):
+# - git clone the correct GRASS source code version into $HOME/src/
# - install dependencies:
# cd $HOME/src/releasebranch_8_4/ && git pull && sudo apt install $(cat .github/workflows/apt.txt)
# - install further dependencies:
-# apt-get install texlive-latex-extra python3-sphinxcontrib.apidoc
+# apt-get install texlive-latex-extra python3-sphinxcontrib.apidoc python3-sphinx-sitemap
+# pip install sphinx-last-updated-by-git sphinx_material --break-system-packages # to avoid virtenv
# - run this script
# - one time only: cross-link code into web space on grasslxd server:
# cd /var/www/html/
@@ -170,7 +172,7 @@ echo "GRASS $VERSION compilation done"
#sh utils/module_synopsis.sh
#### generate developer stuff: pygrass docs + gunittest docs
-# generate pyGRASS sphinx manual (in docs/html/libpython/)
+# generate pyGRASS sphinx manual (in python/grass/docs/)
# including source code
$MYMAKE sphinxdoclib
diff --git a/utils/cronjobs_osgeo_lxd/cron_grass_preview_build_binaries.sh b/utils/cronjobs_osgeo_lxd/cron_grass_preview_build_binaries.sh
index 4e64f33402..d7b44cf3f5 100755
--- a/utils/cronjobs_osgeo_lxd/cron_grass_preview_build_binaries.sh
+++ b/utils/cronjobs_osgeo_lxd/cron_grass_preview_build_binaries.sh
@@ -13,13 +13,13 @@
# - generated the install scripts
# - generates the programmer's 8 HTML manual
# - note: the mkdocs based HTML manual pages are generated by GitHub Action
+# - copies over generated manual pages to grass-devel/manuals/
+# - injects in versioned manual the "canonical" to point to "devel" manual (as seen in the Python manual pages)
# Preparations, on server (neteler@grasslxd:$):
-
+# - git clone the correct GRASS source code version into $HOME/src/
# - install dependencies:
# cd $HOME/src/main/ && git pull && sudo apt install $(cat .github/workflows/apt.txt)
-# - install further dependencies (not needed for mkdocs!):
-# apt-get install texlive-latex-extra python3-sphinxcontrib.apidoc
# - run this script
# - one time only: cross-link code into web space on grasslxd server:
# cd /var/www/html/
@@ -185,7 +185,9 @@ chmod -R a+r,g+w $TARGETPROGMAN/*
# bug in doxygen
(cd $TARGETPROGMAN/ ; ln -s index.html main.html)
+############
# package the GRASS GIS package
+cd $GRASSBUILDDIR
$MYMAKE bindist
if [ $? -ne 0 ] ; then
halt_on_error "make bindist."
@@ -235,19 +237,10 @@ sh $MAINDIR/cronjobs/compile_addons_git.sh $GMAJOR \
$MAINDIR/.grass$GMAJOR/addons \
$SOURCE/$BRANCH/bin.$ARCH/grass \
1
-mkdir -p $TARGETHTMLDIR/addons/
-# copy individual addon html files into one target dir if compiled addon
-# has own dir e.g. $MAINDIR/.grass8/addons/db.join/ with bin/ docs/ etc/ scripts/
-# subdir
-for dir in `find $MAINDIR/.grass$GMAJOR/addons -maxdepth 1 -type d`; do
- if [ -d $dir/docs/html ] ; then
- if [ "$(ls -A $dir/docs/html/)" ]; then
- for f in $dir/docs/html/*; do
- echo "Skipping: cp $f $TARGETHTMLDIR/addons/"
- done
- fi
- fi
-done
+### fetch manual from GH actions
+# fetch artifacts for main (devel)
+bash $HOME/cronjobs/gh_cli_download_artifact.sh $BRANCH
+unzip -t /tmp/mkdocs-site_$BRANCH.zip && cd $TARGETHTMLDIR && rm -rf * && unzip -q /tmp/mkdocs-site_$BRANCH.zip && rm -f /tmp/mkdocs-site_$BRANCH.zip
# copy over logs from $MAINDIR/.grass$GMAJOR/addons/logs/
mkdir -p $TARGETMAIN/addons/grass$GMAJOR/logs/
@@ -257,17 +250,57 @@ cp -p $MAINDIR/.grass$GMAJOR/addons/logs/* $TARGETMAIN/addons/grass$GMAJOR/logs/
$SOURCE/$BRANCH/bin.$ARCH/grass --tmp-project EPSG:4326 --exec $MAINDIR/cronjobs/build-xml.py --build $MAINDIR/.grass$GMAJOR/addons
cp $MAINDIR/.grass$GMAJOR/addons/modules.xml $TARGETMAIN/addons/grass$GMAJOR/modules.xml
+############################################
+# Cloning new manual pages into grass-devel/manuals/ (following the Python manual pages concept)
+# - inject canonical URL therein to point to versioned manual page (avoiding "duplicate content" SEO punishment)
+# see https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
+
+TARGETHTMLDIRDEVEL=$TARGETMAIN/grass-devel/manuals/
+# clone manual pages
+rm -rf $TARGETHTMLDIRDEVEL
+rsync -a $TARGETHTMLDIR/ $TARGETHTMLDIRDEVEL/
+
+############################################
+# SEO: inject canonical link into versioned manual pages (e.g, grass86/)
+# - cd back into folder of versioned HTML manual pages
+# - run sed to replace an existing HTML header string in the upper part of the HTML file
+# with itself + canonical link of devel version
+# --> do this for core manual pages, addons, libpython, recursively
+
+process_files() {
+ local dir="$1"
+ local prefix="$2"
+
+ find "$dir" -type f -name '*.html' | while IFS= read -r myfile; do
+ if ! grep -q 'link rel="canonical"' "$myfile"; then
+ manpage="$prefix$(basename ${myfile})"
+ sed -i -e "s::\n:g" ${myfile}
+ fi
+ done
+}
+
+cd "$TARGETHTMLDIR"
+process_files "$TARGETHTMLDIR" ""
+process_files "$TARGETHTMLDIR/addons" "addons/"
+process_files "$TARGETHTMLDIR/libpython" "libpython/"
+
+# SEO: "devel" manual pages (grass-devel/) is using canonical link
+
############################################
# sitemaps to expand the hugo sitemap is generated by mkdocs GHA job
############################################
# cleanup
cd $GRASSBUILDDIR
-$MYMAKE distclean > /dev/null || (echo "$0: an error occurred" ; exit 1)
+$MYMAKE distclean > /dev/null 2>&1 || (echo "$0: an error occurred in final distclean" ; exit 1)
rm -rf lib/html/ lib/latex/ /tmp/addons
echo "Finished GRASS $VERSION $ARCH compilation."
echo "Written to: $TARGETDIR"
-echo "Copied HTML ${GVERSION} progman to https://grass.osgeo.org/programming${GVERSION}"
+echo "Copied HTML ${GVERSION} manual to https://grass.osgeo.org/grass${VERSION}/manuals/ (with canonical in metadata)"
+echo "Copied pygrass progman ${GVERSION} to https://grass.osgeo.org/grass${VERSION}/manuals/libpython/ (with canonical in metadata)"
+echo "Copied Addons ${GVERSION} to https://grass.osgeo.org/grass${VERSION}/manuals/addons/ (with canonical in metadata)"
+## echo "Copied HTML ${GVERSION} progman to https://grass.osgeo.org/programming${GVERSION}"
+echo "Copied HTML devel manual to https://grass.osgeo.org/grass-devel/manuals/"
exit 0
diff --git a/utils/cronjobs_osgeo_lxd/cron_job_list_grass b/utils/cronjobs_osgeo_lxd/cron_job_list_grass
index 79022ca3da..5b67eed894 100644
--- a/utils/cronjobs_osgeo_lxd/cron_job_list_grass
+++ b/utils/cronjobs_osgeo_lxd/cron_job_list_grass
@@ -22,8 +22,8 @@
# run at 00:30:00 and 12:30:00 each day: fetches code from GitHub and builds it with hugo (target dir: /var/www/html/)
30 */12 * * * nice bash /home/neteler/cronjobs/hugo_clean_and_update_job.sh
-# run at 00:40:00 and 12:40:00 each day:
-40 */12 * * * nice bash /home/neteler/cronjobs/fetch_unpack_manual_GHA.sh > /home/neteler/fetch_unpack_manual_GHA.log 2>&1
+# run at 00:40:00 and 12:40:00 each day (disabled May 2026, integrated in the respective build scripts)
+#40 */12 * * * nice bash /home/neteler/cronjobs/fetch_unpack_manual_GHA.sh > /home/neteler/fetch_unpack_manual_GHA.log 2>&1
# weekly source snapshots (target dir: /var/www/code_and_data/)
# legacy
diff --git a/utils/cronjobs_osgeo_lxd/fetch_unpack_manual_GHA.sh b/utils/cronjobs_osgeo_lxd/fetch_unpack_manual_GHA.sh
deleted file mode 100755
index 5b94ba886e..0000000000
--- a/utils/cronjobs_osgeo_lxd/fetch_unpack_manual_GHA.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-# Purpose: Script to download GRASS 8.5+ "Documentation" artifact from GitHub (produced by GitHub action workflow) and unpack
-#
-# (c) 2025, GPL 2+ Markus Neteler
-#
-# GRASS GIS github, https://github.com/OSGeo/grass
-#
-# requires: jq, gh cli and login via gh auth login
-#
-###################################################################
-#
-# How this script works:
-#
-# to be run on grass.osgeo.org, in "neteler" or "grassbot" userspace
-# - executes gh_cli_download_artifact.sh
-# - unpacks the Documentation artifact both in grass85 and grass-devel dirs on the server
-#########
-
-cd $HOME
-# fetch artifact
-bash /home/neteler/cronjobs/gh_cli_download_artifact.sh
-
-# update twice: number-version and devel-version
-cd /var/www/code_and_data/grass85/manuals/ && rm -rf * && unzip -q /tmp/mkdocs-site.zip
-cd /var/www/code_and_data/grass-devel/manuals/ && rm -rf * && unzip -q /tmp/mkdocs-site.zip
-
-# if run as "neteler", let the grassbot user also write therein
-chmod -R g+rw /var/www/code_and_data/grass85/manuals/* /var/www/code_and_data/grass-devel/manuals/*
-
-# cleanup the artifact file
-rm -f /tmp/mkdocs-site.zip
diff --git a/utils/cronjobs_osgeo_lxd/gh_cli_download_artifact.sh b/utils/cronjobs_osgeo_lxd/gh_cli_download_artifact.sh
index 7fceec13f8..228b6e8193 100755
--- a/utils/cronjobs_osgeo_lxd/gh_cli_download_artifact.sh
+++ b/utils/cronjobs_osgeo_lxd/gh_cli_download_artifact.sh
@@ -3,7 +3,7 @@
# Download "mkdocs-site" from the "documentation.yml" workflow runs
# Script to be run on grass.osgeo.org
#
-# (c) 2025, GPL 2+ Markus Neteler
+# (c) 2025-2026, GPL 2+ Markus Neteler
#
# GRASS GIS github, https://github.com/OSGeo/grass
#
@@ -28,13 +28,19 @@
# - GitHub CLI api: https://cli.github.com/manual/gh_api
# - GitHub workflow runs: https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-workflow
+# branch parameter: "main" or "releasebranch_8_5"
+
+MYBRANCH=$1
+[ -z "$MYBRANCH" ] && MYBRANCH="main"
+
# === Configuration ===
OWNER="OSGeo"
REPO="grass"
-REPO_LOCAL="$HOME/src/main/"
+#
+REPO_LOCAL="$HOME/src/$MYBRANCH/" # e.g., neteler@grasslxd:~/src/main/ or ~/src/releasebranch_8_5/
WORKFLOW_NAME="documentation.yml" # or the workflow filename/id
ARTIFACT_NAME="mkdocs-site" # the name of the artifact
-ZIP_OUTPUT="$ARTIFACT_NAME.zip"
+ZIP_OUTPUT="$ARTIFACT_NAME_$MYBRANCH.zip"
OUTPUT_DIR="/tmp"
# === Script ===
@@ -56,7 +62,7 @@ cd $REPO_LOCAL
echo "Identifying last successful workflow run for '$WORKFLOW_NAME'..."
RUN_ID=$(gh run list \
- --branch main \
+ --branch "$MYBRANCH" \
--repo "$OWNER/$REPO" \
--workflow "$WORKFLOW_NAME" \
--status success \