Skip to content

Commit f151ddc

Browse files
committed
build_docs: conditionally install mermaid
1 parent 3ccdc92 commit f151ddc

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

build_docs/linuxdocs.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,9 @@ if [ "$skippackagesoption" != "yes" ]; then
217217
node --version
218218
npm --version
219219
npm install gulp-cli@2.3.0
220-
npm install @mermaid-js/mermaid-cli@10.5.1
221-
220+
if grep -r mermaid "$BOOST_SRC_FOLDER/doc/"; then
221+
npm install @mermaid-js/mermaid-cli@10.5.1
222+
fi
222223

223224
fi
224225
if [ "$typeoption" = "cppalv1" ]; then

build_docs/macosdocs.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ if [ "$skippackagesoption" != "yes" ]; then
267267
node --version
268268
npm --version
269269
npm install gulp-cli@2.3.0
270-
npm install @mermaid-js/mermaid-cli@10.5.1
270+
if grep -r mermaid "$BOOST_SRC_FOLDER/doc/"; then
271+
npm install @mermaid-js/mermaid-cli@10.5.1
272+
fi
271273
fi
272274

273275
brew install ruby

build_docs/windowsdocs.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,11 @@ if ( -Not ${skip-packages} ) {
417417
}
418418

419419
npm install gulp-cli@2.3.0
420-
npm install @mermaid-js/mermaid-cli@10.5.1
420+
421+
# need to check this code:
422+
if (Get-ChildItem -Path "$BOOST_SRC_FOLDER/doc/" -Recurse -File | Select-String -Pattern "mermaid" -Quiet) {
423+
npm install @mermaid-js/mermaid-cli@10.5.1
424+
}
421425

422426
}
423427

0 commit comments

Comments
 (0)