forked from approvals/ApprovalTests.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_markdown_templates.sh
executable file
·32 lines (28 loc) · 1.36 KB
/
run_markdown_templates.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# ---------------------------------------------------
# Update code examples
# ---------------------------------------------------
# For info on mdsnippets, see https://github.com/SimonCropp/MarkdownSnippets
# install dotnet SDK from http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
# Then install MarkdownSnippets.Tool with
# dotnet tool install -g MarkdownSnippets.Tool
# To update:
# dotnet tool update -g MarkdownSnippets.Tool
# To uninstall (e.g. to downgrade to a lower version)
# dotnet tool uninstall -g MarkdownSnippets.Tool
# Maintenance Note:
# Before updating the pinned version of MarkdownSnippets.Tool to a new
# pinned version, the new version needs to be installed and run via this
# this script, and then the python tests in doc/sphinx/tests need to be run.
#
# This is because, occasionally, updates to MarkdownSnippets.Tool change
# the hidden comments that it adds to .md files, and this can
# break doc/sphinx/markdown_conversion.py and therefore result in
# broken formatting or hyperlinks in ReadTheDocs.
#
# See https://github.com/approvals/ApprovalTests.cpp/blob/master/doc/BuildingDocumentation.md#top
dotnet tool update -g MarkdownSnippets.Tool --version 23.0.0 || exit
mdsnippets || exit 1
echo "------------------------------------------"
echo "Custom Markdown linting:"
./fix_markdown.sh | grep -v cmake-build