summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-08-09 10:17:10 +0300
committerLars Wirzenius <liw@liw.fi>2020-08-09 10:17:10 +0300
commit615d5d3d72b1a0b1c1227df7b70b03ac2698bf0d (patch)
treebed0742ddcf969d6e7c99f82da78319f292430dc
parent35d3a296b10d7b52019e68effae42144d74dfead (diff)
downloadvmdb2-615d5d3d72b1a0b1c1227df7b70b03ac2698bf0d.tar.gz
fix: make sure separate plugins show up as separate sections
format.sh was just catting the files together. create_dir.mdwn did not end in an empty line, which meant that create_file.mdwn's first line was not interpreted as a heading. Fix is to make sure files are separated by an empty line. <type>[optional scope]: <description> [optional body] [optional footer(s)]
-rwxr-xr-xcheck13
-rwxr-xr-xformat.sh2
2 files changed, 14 insertions, 1 deletions
diff --git a/check b/check
index 43f671a..101da55 100755
--- a/check
+++ b/check
@@ -30,6 +30,10 @@ fi
echo Formatting docs ========================================
./format.sh
+plugindocs() {
+ ls -1 vmdb/plugins/*.mdwn
+}
+
steps() {
sed -n '/<h2 id="step-.*> Step: /s///p' vmdb2.html
}
@@ -43,6 +47,15 @@ panic() {
exit 1
}
+for doc in $(plugindocs)
+do
+ n="$(grep -c '^Step:' "$doc")"
+ if [ "$n" != 1 ]
+ then
+ panic "Plugin doc $doc must have exactly 1 step title"
+ fi
+done
+
n="$(code | wc -l)"
if [ "$n" != 0 ]
then
diff --git a/format.sh b/format.sh
index 21f94c2..9de48dc 100755
--- a/format.sh
+++ b/format.sh
@@ -9,7 +9,7 @@ cleanup()
trap cleanup EXIT
-cat vmdb2.md vmdb/plugins/*.mdwn > tmp.md
+(cat vmdb2.md; for x in vmdb/plugins/*.mdwn; do cat "$x"; echo; done) > tmp.md
if command -v sp-docgen > /dev/null
then
sp-docgen tmp.md -o vmdb2.html