bigbluebutton-Github/docs/build.sh

26 lines
545 B
Bash
Raw Normal View History

#!/bin/bash
set -eu
2023-01-13 04:46:18 +08:00
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"
2023-01-13 04:46:18 +08:00
yarn docusaurus docs:version "${version}"
fi
done
git checkout "$current_branch"