c87294b5b2
This commit contains: * fix the build script, so that only versions are added that have a `docusaurus.config.js` * some refactoring so that the build script will work well with github pages * add configuration to the `docusaurus.config.js` to display a dropdown menu to select a version The behavior for the versioning is now so that 2.6 is both the 'latest' version as well as the 'next' version. As soon as 2.7 will be built that will be displayed as the 'next' version. closes #16671
26 lines
545 B
Bash
Executable File
26 lines
545 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
git fetch --all
|
|
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
|
|
|
git branch --remotes | grep '/v' | while read -r version; do
|
|
branch=${version##*/}
|
|
remote=${version%/*}
|
|
git fetch "$remote" "$branch":"$branch"
|
|
done
|
|
|
|
git branch | sed --quiet 's/^.*v\(.*\).x-release/\1/p' \
|
|
| while read -r version; do
|
|
|
|
git checkout "v${version}.x-release"
|
|
if [ -f docusaurus.config.js ]; then
|
|
echo "Adding documentation for $version"
|
|
yarn docusaurus docs:version "${version}"
|
|
fi
|
|
|
|
done
|
|
|
|
git checkout "$current_branch"
|