a005b2a6b1
In order to be able to control better which branches are actually used for building the docs, this commit changes the logic of the script to only add manually specified versionsi to the docs.
33 lines
645 B
Bash
Executable File
33 lines
645 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
# Build the docs only for these release branches
|
|
BRANCHES=(
|
|
v2.6.x-release
|
|
# v2.7.x-release
|
|
)
|
|
REMOTE="origin"
|
|
|
|
git fetch --all
|
|
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
|
|
|
for branch in "${BRANCHES[@]}"; do
|
|
|
|
if [ "$branch" != "$current_branch" ]; then
|
|
git fetch "$REMOTE" "$branch":"$branch"
|
|
fi
|
|
|
|
git checkout "$branch"
|
|
if [ -f docusaurus.config.js ]; then
|
|
version=${branch:1:3}
|
|
echo "Adding documentation for $version"
|
|
yarn docusaurus docs:version "${version}"
|
|
else
|
|
echo "Warning: branch $(branch) does not contain a docusaurus.config.js!"
|
|
fi
|
|
|
|
done
|
|
|
|
git checkout "$current_branch"
|