This is an automated email from the ASF dual-hosted git repository.
bnolsen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git
The following commit(s) were added to refs/heads/main by this push:
new ea1753a rework cmake docs to use new cmake doc_lang variable
new f9faf7c Merge pull request #274 from traeak/docs_fix2
ea1753a is described below
commit ea1753aa40d7f9a3c30e68cffacbbe792227c46a
Author: Brian Olsen <[email protected]>
AuthorDate: Fri Oct 27 09:45:33 2023 -0600
rework cmake docs to use new cmake doc_lang variable
---
jenkins/bin/docs.sh | 36 +++++++++++++++++-------------------
1 file changed, 17 insertions(+), 19 deletions(-)
diff --git a/jenkins/bin/docs.sh b/jenkins/bin/docs.sh
index f8f945a..9b02d19 100755
--- a/jenkins/bin/docs.sh
+++ b/jenkins/bin/docs.sh
@@ -36,8 +36,8 @@ test -z "${ATS_MAKE}" && ATS_MAKE="make"
# fi
#fi
-vername=${GITHUB_PR_NUMBER}
-test -z "${GITHUB_PR_NUMBER}" && vername=${GITHUB_BRANCH}
+vername="${GITHUB_PR_NUMBER:=""}"
+[ -z "${GITHUB_PR_NUMBER}" ] && vername="${GITHUB_BRANCH}"
outputdir="${PWD}/output"
enoutdir="${outputdir}/en/${vername}"
@@ -48,8 +48,22 @@ sudo chmod -R ugo+w . || exit 1
if [ -d cmake ]
then
- cmake -B docbuild -DENABLE_DOCS=ON
+
+ docbuilddir="docbuild/doc/docbuild"
+
+ # english
+ rm -rf docbuild
+ cmake -B docbuild -DDOC_LANG:STRING='en' -DENABLE_DOCS=ON
cmake --build docbuild --target generate_docs -v || exit 1
+ mkdir -p "${enoutdir}"
+ /bin/cp -rf "${docbuilddir}"/html "${enoutdir}"
+
+ # japanese
+ rm -rf docbuild
+ cmake -B docbuild -DDOC_LANG:STRING='ja' -DENABLE_DOCS=ON
+ cmake --build docbuild --target generate_docs -v || exit 1
+ mkdir -p "${jaoutdir}"
+ /bin/cp -rf "${docbuilddir}"/html "${jaoutdir}"
else
@@ -93,22 +107,6 @@ _END_OF_DOC_
fi
-# If we made it here, the doc build ran and succeeded. Let's copy out the
-# docbuild contents so it can be published.
-mkdir -p ${outputdir}
-docbuilddir="docbuild"
-if [ -d docbuild ]
-then
- docbuilddir="docbuild"
-elif [ -d docbuild/doc/docbuild ]
-then
- docbuilddir="docbuild/doc/docbuild"
-else
- echo "Could not find build docs."
- exit 1
-fi
-
-cp -rf "${docbuilddir}" "${outputdir}"
ls "${outputdir}/docbuild"
sudo chmod -R u=rwX,g=rX,o=rX "${outputdir}" || exit 1