Changeset View
Changeset View
Standalone View
Standalone View
scripts/fetch_documentation.sh
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | then | ||||
fi | fi | ||||
# Cache the result | # Cache the result | ||||
cp -R "${BUILD_DIR}/doc/rpc/en/${VERSION}/rpc" "${VERSION_DIR}/" | cp -R "${BUILD_DIR}/doc/rpc/en/${VERSION}/rpc" "${VERSION_DIR}/" | ||||
fi | fi | ||||
if [ "${BUILD_MAN_PAGES}" = "yes" ] && [ ! -d "${VERSION_DIR}/man" ] | if [ "${BUILD_MAN_PAGES}" = "yes" ] && [ ! -d "${VERSION_DIR}/man" ] | ||||
then | then | ||||
# xvfb is only needed to build 0.22.3. Once this version is phased out, | # xvfb is only needed to build headlessly. | ||||
# xvfb can be removed. | |||||
if ! command -v xvfb-run | if ! command -v xvfb-run | ||||
then | then | ||||
echo "xvfb is required to build 0.22.3 docs headlessly, please install it" | echo "xvfb is required to build the docs headlessly, please install it." | ||||
exit 3 | exit 3 | ||||
fi | fi | ||||
if [[ "${VERSION}" == "0.22.3" ]]; then | if [[ "${VERSION}" == "0.22.3" ]]; then | ||||
# Cherry pick a fix to ensure the version number is set correctly | # Cherry pick a fix to ensure the version number is set correctly | ||||
git cherry-pick 6f59a8facadb99ffa0f64421d7248043de507c64 | git cherry-pick 6f59a8facadb99ffa0f64421d7248043de507c64 | ||||
fi | fi | ||||
# Build and install the man pages | # Build and install the man pages | ||||
cmake -GNinja "${SRC_DIR}" -DCLIENT_VERSION_IS_RELEASE=ON -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" | cmake -GNinja "${SRC_DIR}" -DCLIENT_VERSION_IS_RELEASE=ON -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" | ||||
if [[ "${VERSION}" == "0.22.3" ]]; then | # Version 0.22.4 calls xvfb-run and can cause a race, so force using a | ||||
xvfb-run -a -e /dev/stderr ninja install-manpages-html | # single job. | ||||
else | # FIXME Remove the -j1 once 0.22.4 gets obsoleted. | ||||
ninja install-manpages-html | xvfb-run -a -e /dev/stderr ninja -j1 install-manpages-html | ||||
fi | |||||
mkdir -p "${VERSION_DIR}/man" | mkdir -p "${VERSION_DIR}/man" | ||||
# Cache the result | # Cache the result | ||||
cp "${INSTALL_DIR}"/share/man/html/* "${VERSION_DIR}/man/" | cp "${INSTALL_DIR}"/share/man/html/* "${VERSION_DIR}/man/" | ||||
fi | fi | ||||
popd | popd | ||||
# Copy everything from the cache to the website directory | # Copy everything from the cache to the website directory | ||||
Show All 11 Lines |