This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 22a519d4055 [FLINK-27485][docs] Fix documentation build pipeline Fix 
the documentation build pipeline by 1) using a different Git command (which is 
supported by the installed Git version on the Docker image) and 2) upgrading 
Hugo and making sure that this is added to the PATH (#19632)
22a519d4055 is described below

commit 22a519d405549d7a53f02697b850929100399872
Author: MartijnVisser <martijnvis...@apache.org>
AuthorDate: Wed May 4 12:30:39 2022 +0200

    [FLINK-27485][docs] Fix documentation build pipeline Fix the documentation 
build pipeline by 1) using a different Git command (which is supported by the 
installed Git version on the Docker image) and 2) upgrading Hugo and making 
sure that this is added to the PATH (#19632)
    
    - use compatible command to get the current git branch
    - put hugo onto PATH
---
 .github/workflows/docs.sh | 10 +++++-----
 docs/setup_docs.sh        |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/docs.sh b/.github/workflows/docs.sh
index abf0497e94c..ed970140dd4 100755
--- a/.github/workflows/docs.sh
+++ b/.github/workflows/docs.sh
@@ -23,23 +23,23 @@ java -version
 javadoc -J-version
 
 # setup hugo
-HUGO_REPO=https://github.com/gohugoio/hugo/releases/download/v0.80.0/hugo_extended_0.80.0_Linux-64bit.tar.gz
-HUGO_ARTIFACT=hugo_extended_0.80.0_Linux-64bit.tar.gz
+HUGO_REPO=https://github.com/gohugoio/hugo/releases/download/v0.98.0/hugo_extended_0.98.0_Linux-64bit.tar.gz
+HUGO_ARTIFACT=hugo_extended_0.98.0_Linux-64bit.tar.gz
 if ! curl --fail -OL $HUGO_REPO ; then
        echo "Failed to download Hugo binary"
        exit 1
 fi
-tar -zxvf $HUGO_ARTIFACT
+tar -zxvf $HUGO_ARTIFACT -C /usr/local/bin
 git submodule update --init --recursive
 # Setup the external documentation modules
 cd docs
 source setup_docs.sh
 cd ..
 # Build the docs
-./hugo --source docs
+hugo --source docs
 
 # generate docs into docs/target
-./hugo -v --source docs --destination target
+hugo -v --source docs --destination target
 if [ $? -ne 0 ]; then
        echo "Error building the docs"
        exit 1
diff --git a/docs/setup_docs.sh b/docs/setup_docs.sh
index 01230c1c7a2..34f3d59d99c 100755
--- a/docs/setup_docs.sh
+++ b/docs/setup_docs.sh
@@ -33,7 +33,7 @@ EOF
 echo "Created temporary file" $goModFileLocation/go.mod
 
 # Make Hugo retrieve modules which are used for externally hosted documentation
-currentBranch=$(git branch --show-current)
+currentBranch=$(git rev-parse --abbrev-ref HEAD)
 
 if [[ ! "$currentBranch" =~ ^release- ]] || [[ -z "$currentBranch" ]]; then
   # If the current branch is master or not provided, get the documentation 
from the main branch

Reply via email to