Skip to content
Permalink
Browse files
[FLINK-27485][docs] Fix documentation build pipeline Fix the document…
…ation 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
  • Loading branch information
MartijnVisser committed May 4, 2022
1 parent 7128a60 commit 22a519d405549d7a53f02697b850929100399872
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
@@ -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
@@ -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

0 comments on commit 22a519d

Please sign in to comment.