代码拉取完成,页面将自动刷新
同步操作将从 EdgeGallery/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
# Local build verification
if [[ -z "$BUILD_NUMBER" ]]; then
echo "Set BUILD_NUMBER env var"
exit 1
fi
# Common function for exit function
exit_if_error() {
local exit_code=$1
shift
[[ $exit_code ]] &&
((exit_code != 0)) && {
printf 'ERROR: %s\n' "$@" >&2
}
}
# Common clean up function
cleanup() {
rm -rf ~/docs_jjb
}
# cleanup and create a virtual python directory for docs command executions.
cleanup
mkdir -p ~/docs_jjb/virtualpython
virtualenv -p /usr/bin/python3 ~/docs_jjb/virtualpython
source ~/docs_jjb/virtualpython/bin/activate
exit_if_error $? "Unable to activate virtual python."
# Tool installation and html generation
pip install sphinx
exit_if_error $? "sphinx installation failed."
pip install recommonmark
exit_if_error $? "recommonmark installation failed."
pip install sphinx_markdown_tables
exit_if_error $? "sphinx_rtd_theme installation failed."
sphinx_markdown_tables
pip install sphinx_rtd_theme
exit_if_error $? "sphinx_rtd_theme installation failed."
pip install -r requirements.txt
exit_if_error $? "Running requirements.txt failed."
make html
exit_if_error $? "Unable to generate Chinese HTML documents."
sphinx-build -b gettext . _build/gettext
exit_if_error $? "Unable to generate .pot documents."
sphinx-intl update -p _build/gettext -l en --line-width=99999999999999999999
exit_if_error $? "Unable to generate .po documents."
sphinx-build -b html -D language=en . _build/html/en
exit_if_error $? "Unable to generate English HTML documents."
mkdir -p /var/www/html/$BUILD_NUMBER
cp -r _build/html/en/* /var/www/html/$BUILD_NUMBER/
# Cleanup and exit
cleanup
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。