bigbluebutton-Github/docs/build.sh

38 lines
744 B
Bash
Raw Normal View History

#!/bin/bash
set -eu
2023-01-13 04:46:18 +08:00
# Build the docs only for these release branches
BRANCHES=(
2023-03-17 03:18:27 +08:00
v2.5.x-release
v2.6.x-release
2023-06-01 22:05:46 +08:00
v2.7.x-release
# v2.8.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}
2023-06-01 22:05:46 +08:00
if [ version == "2.7" ]; then
version="2.7-dev"
fi
echo "Adding documentation for $version"
2023-01-13 04:46:18 +08:00
yarn docusaurus docs:version "${version}"
else
echo "Warning: branch $(branch) does not contain a docusaurus.config.js!"
fi
done
git checkout "$current_branch"