File tree 4 files changed +29
-11
lines changed
4 files changed +29
-11
lines changed Original file line number Diff line number Diff line change 1
- .dockerignore
2
- * Dockerfile *
1
+ ** / .git
2
+ / build /
Original file line number Diff line number Diff line change @@ -5,13 +5,14 @@ ENV DEBIAN_FRONTEND noninteractive
5
5
LABEL Description="This image is used to create an environment to contribute to the cakephp/docs"
6
6
7
7
RUN apt-get update && apt-get install -y \
8
+ latexmk \
9
+ openjdk-8-jdk \
10
+ php \
8
11
python3-pip \
9
- texlive-latex-recommended \
10
- texlive-latex-extra \
11
12
texlive-fonts-recommended \
12
13
texlive-lang-all \
13
- latexmk \
14
- openjdk-8-jdk \
14
+ texlive-latex-extra \
15
+ texlive-latex-recommended \
15
16
&& apt-get clean \
16
17
&& rm -rf /var/lib/apt/lists/*
17
18
Original file line number Diff line number Diff line change @@ -5,12 +5,13 @@ ENV DEBIAN_FRONTEND noninteractive
5
5
LABEL Description="This image is used to create deployable images for book.cakephp.org"
6
6
7
7
RUN apt-get update && apt-get install -y \
8
+ latexmk \
9
+ php \
8
10
python3-pip \
9
- texlive-latex-recommended \
10
- texlive-latex-extra \
11
11
texlive-fonts-recommended \
12
12
texlive-lang-all \
13
- latexmk \
13
+ texlive-latex-extra \
14
+ texlive-latex-recommended \
14
15
&& apt-get clean \
15
16
&& rm -rf /var/lib/apt/lists/*
16
17
Original file line number Diff line number Diff line change 11
11
define ('ES_INDEX ' , 'documentation ' );
12
12
define ('CAKEPHP_VERSION ' , '4-0 ' );
13
13
14
+ // file exclusion patterns
15
+ const FILE_EXCLUSIONS = [
16
+ '/404\.rst$/ ' ,
17
+ ];
18
+
14
19
/**
15
20
* The main function
16
21
*
@@ -32,13 +37,24 @@ function main($argv)
32
37
} else {
33
38
define ('ES_HOST ' , ES_DEFAULT_HOST );
34
39
}
35
-
40
+
36
41
$ directory = new RecursiveDirectoryIterator ($ lang );
37
42
$ recurser = new RecursiveIteratorIterator ($ directory );
38
43
$ matcher = new RegexIterator ($ recurser , '/\.rst/ ' );
39
44
40
45
foreach ($ matcher as $ file ) {
41
- updateIndex ($ lang , $ file );
46
+ $ skip = false ;
47
+ foreach (FILE_EXCLUSIONS as $ exclusion ) {
48
+ if (preg_match ($ exclusion , $ file ) === 1 ) {
49
+ echo "\nSkipping $ file \n" ;
50
+ $ skip = true ;
51
+ break ;
52
+ }
53
+ }
54
+
55
+ if (!$ skip ) {
56
+ updateIndex ($ lang , $ file );
57
+ }
42
58
}
43
59
44
60
echo "\nIndex update complete \n" ;
You can’t perform that action at this time.
0 commit comments