Browse Source

Cleanup doc-tools-check-languages

Remove now unused content.

Change-Id: I77f5b2927f4d455e34c55afc8e98b6533ac6f459
tags/2.0.0
Andreas Jaeger 1 month ago
parent
commit
8f7f1d97fe
1 changed files with 15 additions and 43 deletions
  1. 15
    43
      bin/doc-tools-check-languages

+ 15
- 43
bin/doc-tools-check-languages View File

@@ -12,8 +12,6 @@
12 12
 # License for the specific language governing permissions and limitations
13 13
 # under the License.
14 14
 
15
-FIRSTAPP_TAGS="libcloud dotnet fog openstacksdk pkgcloud shade"
16
-
17 15
 # This marker is needed for Infra publishing and needs to go into the
18 16
 # root directory of each translated manual as file ".root-marker".
19 17
 MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_BRANCH Build: $ZUUL_UUID Revision: $ZUUL_NEWREF"
@@ -28,17 +26,12 @@ function build_rst {
28 26
     # uses SitePackages=True and we have to install Sphinx in the venv
29 27
     # together with openstackdocstheme. With SitePackages, the global Sphinx
30 28
     # is used and that will not work with a local openstackdocstheme installed.
31
-    TAG=""
32
-    # We need to extract all strings, so add all supported tags
33
-    if [ ${book} = "firstapp" ] ; then
34
-        TAG="-t libcloud -t fog -t dotnet -t openstacksdk -t pkgcloud -t shade"
35
-    fi
36 29
 
37 30
     COMMON="common"
38 31
     LOCALE_DIR="${DOC_DIR}${book}/source/locale/"
39 32
     COMMON_DIR="${DOC_DIR}${COMMON}/source/locale/"
40 33
 
41
-    tox -evenv -- sphinx-build -q -E -W -b gettext $TAG \
34
+    tox -evenv -- sphinx-build -q -E -W -b gettext \
42 35
                 ${DOC_DIR}${book}/source/ ${LOCALE_DIR}
43 36
 
44 37
 
@@ -85,35 +78,19 @@ function build_rst {
85 78
             ${DOC_DIR}${book}/source/conf.py
86 79
     fi
87 80
 
88
-    # Build all books
89
-    if [ ${book} = "firstapp" ] ; then
90
-        # Firstapp has several variations, build all of them
91
-        for tag in $FIRSTAPP_TAGS ; do
92
-            BUILD_DIR="${DOC_DIR}${book}/build-${tag}/html"
93
-            DOCTREES="${BUILD_DIR}.doctrees"
94
-            tox -evenv -- sphinx-build -q -E \
95
-                -t $tag -D language=${language} \
96
-                -d ${DOCTREES} \
97
-                ${DOC_DIR}${book}/source/ \
98
-                ${BUILD_DIR}
99
-            PUBLISH_DIR=publish-docs/html/${language}/${book}-${tag}
100
-            mkdir -p ${PUBLISH_DIR}
101
-            rsync -a ${DOC_DIR}${book}/build-${tag}/html/ ${PUBLISH_DIR}
102
-            echo $MARKER_TEXT > ${PUBLISH_DIR}/.root-marker
103
-        done
104
-    else
105
-        BUILD_DIR="${DOC_DIR}${book}/build/html"
106
-        DOCTREES="${BUILD_DIR}.doctrees"
107
-        tox -evenv -- sphinx-build \
108
-            -q -E -D language=${language} \
109
-            -d ${DOCTREES} \
110
-            ${DOC_DIR}${book}/source/ \
111
-            ${BUILD_DIR}
112
-        PUBLISH_DIR=publish-docs/html/${language}/${book}/
113
-        mkdir -p ${PUBLISH_DIR}
114
-        rsync -a ${DOC_DIR}${book}/build/html/ ${PUBLISH_DIR}
115
-        echo $MARKER_TEXT > ${PUBLISH_DIR}/.root-marker
116
-    fi
81
+    # Build book
82
+    BUILD_DIR="${DOC_DIR}${book}/build/html"
83
+    DOCTREES="${BUILD_DIR}.doctrees"
84
+    tox -evenv -- sphinx-build \
85
+        -q -E -D language=${language} \
86
+        -d ${DOCTREES} \
87
+        ${DOC_DIR}${book}/source/ \
88
+        ${BUILD_DIR}
89
+    PUBLISH_DIR=publish-docs/html/${language}/${book}/
90
+    mkdir -p ${PUBLISH_DIR}
91
+    rsync -a ${DOC_DIR}${book}/build/html/ ${PUBLISH_DIR}
92
+    echo $MARKER_TEXT > ${PUBLISH_DIR}/.root-marker
93
+
117 94
     # Remove newly created files
118 95
     git clean -f -q ${LOCALE_DIR}${language}/LC_MESSAGES/*.po
119 96
     git clean -f -x -q ${LOCALE_DIR}${language}/LC_MESSAGES/*.mo
@@ -134,11 +111,6 @@ function test_language {
134 111
     echo "Building for language $language"
135 112
     echo
136 113
 
137
-    args=("-v")
138
-    if [[ $PURPOSE -eq "publish" ]]; then
139
-        args+=("--publish")
140
-    fi
141
-    args+=("--check-build" "-l $language")
142 114
     for book in ${BOOKS["$language"]}; do
143 115
         if [ ${SPECIAL_BOOKS[$book]+_} ] ; then
144 116
             if [ ${SPECIAL_BOOKS[$book]} = "RST" ] ; then
@@ -156,7 +128,7 @@ function usage {
156 128
     echo
157 129
     echo "CONF_FILE is the path to the configuration file."
158 130
     echo
159
-    echo "PURPOSE is either 'test' or 'publish'."
131
+    echo "PURPOSE is  'test' or 'publish' (is ignored)."
160 132
     echo
161 133
     echo "LANGUAGE is either 'all' or 'LANG'."
162 134
     echo "LANG is a language code like 'fr' or 'ja'."

Loading…
Cancel
Save