This is an automated email from the ASF dual-hosted git repository.
leonard pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/flink-web.git
The following commit(s) were added to refs/heads/asf-site by this push:
new a38a876206 [FLINK-39353][build] Check hugo version in local bash
scripts
a38a876206 is described below
commit a38a876206697cbcd5f41a4a90b9b52f1289abc0
Author: Leonard Xu <[email protected]>
AuthorDate: Wed Apr 1 10:22:26 2026 +0800
[FLINK-39353][build] Check hugo version in local bash scripts
This closes #838.
---
build.sh | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/build.sh b/build.sh
index c3ec19fa1d..65b6295511 100755
--- a/build.sh
+++ b/build.sh
@@ -17,6 +17,8 @@
# limitations under the License.
################################################################################
+REQUIRED_HUGO_VERSION="0.124.1"
+
if ! command -v hugo &> /dev/null
then
echo "Hugo must be installed to run the docs locally"
@@ -24,6 +26,22 @@ then
exit 1
fi
+HUGO_VERSION_OUTPUT=$(hugo version)
+HUGO_VERSION=$(echo "${HUGO_VERSION_OUTPUT}" | grep -oE
'[0-9]+\.[0-9]+\.[0-9]+' | head -1)
+if [[ "${HUGO_VERSION}" != "${REQUIRED_HUGO_VERSION}" ]]
+then
+ echo "Hugo version ${REQUIRED_HUGO_VERSION} is required, but found
${HUGO_VERSION}"
+ echo "Please install Hugo extended v${REQUIRED_HUGO_VERSION}"
+ exit 1
+fi
+
+if ! echo "${HUGO_VERSION_OUTPUT}" | grep -qi 'extended'
+then
+ echo "Hugo extended edition is required, but a non-extended version was
found"
+ echo "Please install Hugo extended v${REQUIRED_HUGO_VERSION}"
+ exit 1
+fi
+
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
source "${SCRIPT_DIR}/_utils.sh"