Skip to content

Commit

Permalink
Merge pull request #1 from rkratky/meson-updates
Browse files Browse the repository at this point in the history
Meson and docs-validation updates to reflect new docs dir structure.
  • Loading branch information
davidekete authored Sep 24, 2024
2 parents f038e81 + 196c0b0 commit 6890664
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions doc/meson.build
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
if pandoc.found()
custom_target(
input: ['manpage-header.md', 'structure-id.md', 'netplan-yaml.md', 'manpage-footer.md'],
input: ['manpage-header.md', 'explanation/structure-id.md', 'reference/netplan-yaml.md', 'manpage-footer.md'],
output: 'netplan.5',
command: [pandoc, '-s', '-o', '@OUTPUT@', '--from=markdown-smart', '@INPUT@'],
install: true,
install_dir: join_paths(get_option('mandir'), 'man5'))
custom_target(
input: 'netplan-yaml.md',
input: 'reference/netplan-yaml.md',
output: 'netplan.html',
command: [pandoc, '-s', '--metadata', 'title="Netplan reference"', '--toc', '-o', '@OUTPUT@', '@INPUT@'],
install: true,
Expand All @@ -15,7 +15,7 @@ if pandoc.found()
'netplan-apply', 'netplan-dbus', 'netplan-generate', 'netplan-get', 'netplan-set',
'netplan-try', 'netplan-info', 'netplan-ip', 'netplan-status', 'netplan-rebind',
]
markdown = files(doc + '.md')
markdown = files('reference/' + doc + '.md')
manpage = doc + '.8'
custom_target(
input: markdown,
Expand Down
4 changes: 2 additions & 2 deletions tests/validate_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ fi
for term in $(sed -n 's/[ ]\+{"\([a-z0-9-]\+\)", YAML_[A-Z]\+_NODE.*/\1/p' src/parse.c | sort | uniq); do
# it can be documented in the following ways.
# 1. "Properties for device type `blah:`
if egrep "## Properties for device type \`$term:\`" doc/netplan-yaml.md > /dev/null; then
if egrep "## Properties for device type \`$term:\`" doc/reference/netplan-yaml.md > /dev/null; then
continue
fi

# 2. "[blah, ]**blah**[, **blah2**]: (scalar|bool|...)
if egrep "Alias: \*\*\`$term\`\*\*|\*\*\`$term\`\*\*.*\((scalar|boolean|mapping|sequence of scalars|sequence of mappings|sequence of sequence of scalars)" doc/netplan-yaml.md > /dev/null; then
if egrep "Alias: \*\*\`$term\`\*\*|\*\*\`$term\`\*\*.*\((scalar|boolean|mapping|sequence of scalars|sequence of mappings|sequence of sequence of scalars)" doc/reference/netplan-yaml.md > /dev/null; then
continue
fi

Expand Down

0 comments on commit 6890664

Please sign in to comment.