"...git@developer.sourcefind.cn:OpenDAS/opencompass.git" did not exist on "58a57a4c45d881be27ecaf7fb1a673fbf905e72f"
Unverified Commit 91bfefcc authored by liuzhe-lz's avatar liuzhe-lz Committed by GitHub
Browse files

Update doc Makefile (#4754)

parent 4feab0e3
# Minimal makefile for Sphinx documentation .PHONY: all
# all: en zh
# You can set these variables from the command line. .PHONY: en
SPHINXOPTS = en:
SPHINXBUILD = sphinx-build ## English ##
SOURCEDIR = source sphinx-build -T source build/html
BUILDDIR = build
# Put it first so that "make" without argument is like "make help". .PHONY: zh
help: zh:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) ## Chinese ##
sphinx-build -T -D language=zh source build/html_zh
# Build message catelogs for translation # Build message catelogs for translation
.PHONY: i18n
i18n: i18n:
@$(SPHINXBUILD) -M getpartialtext "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) sphinx-build -b getpartialtext source build/i18n
sphinx-intl update -p "$(BUILDDIR)/getpartialtext" -d "$(SOURCEDIR)/locales" -l zh sphinx-intl update -p build/i18n -d source/locales -l zh
.PHONY: help Makefile .PHONY: clean
clean:
# Catch-all target: route all unknown targets to Sphinx using the new rm -rf build
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). rm -rf source/reference/_modules
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
...@@ -19,10 +19,6 @@ stages: ...@@ -19,10 +19,6 @@ stages:
parameters: parameters:
platform: ubuntu-latest platform: ubuntu-latest
- script: |
sudo apt-get install -y pandoc
displayName: Install pandoc
- script: | - script: |
cd docs cd docs
rstcheck -r source \ rstcheck -r source \
...@@ -33,30 +29,27 @@ stages: ...@@ -33,30 +29,27 @@ stages:
- script: | - script: |
cd docs cd docs
make -e SPHINXOPTS="-W --keep-going -T -q" html sphinx-build -W --keep-going -T -q source build/html
displayName: Sphinx sanity check displayName: Sphinx sanity check
- script: | - script: |
set -e set -e
cd docs cd docs
rm -rf build
sudo apt-get install -y gettext sudo apt-get install -y gettext
python tools/translation_patch.py python tools/translation_patch.py
make -e SPHINXOPTS="-W --keep-going -T -q -D language='zh'" html sphinx-build -W --keep-going -T -q -D language=zh source build/html_zh
displayName: Sphinx sanity check (Chinese) displayName: Sphinx sanity check (Chinese)
- script: | - script: |
set -e set -e
cd docs cd docs
rm -rf build
make i18n make i18n
git diff --exit-code source/locales git diff --exit-code source/locales
displayName: Translation up-to-date displayName: Translation up-to-date
- script: | - script: |
cd docs cd docs
rm -rf build sphinx-build -b linkcheck -W --keep-going -T -q source build/linkcheck
make -e SPHINXOPTS="-W -T -b linkcheck -q --keep-going" html
displayName: External links integrity check displayName: External links integrity check
- job: python - job: python
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment