summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-09-09 10:09:40 +0300
committerLars Wirzenius <liw@liw.fi>2022-09-09 10:09:40 +0300
commit2a78d1909ba7ccecad6e07a4b988eb77d4385359 (patch)
tree05beca8fe80d19ec7e7529389702048eee2ab631
parent7feb9f78e51c22ffa8c1cec5fed033e689949576 (diff)
downloadvmadm-2a78d1909ba7ccecad6e07a4b988eb77d4385359.tar.gz
fix: use new Subplot external metadata
Sponsored-by: author
-rwxr-xr-xcheck31
-rw-r--r--vmadm.md16
-rw-r--r--vmadm.subplot15
3 files changed, 29 insertions, 33 deletions
diff --git a/check b/check
index 0e48419..a6018e3 100755
--- a/check
+++ b/check
@@ -5,27 +5,24 @@
set -eu
hideok=chronic
-if [ "$#" -gt 0 ]
-then
- case "$1" in
+if [ "$#" -gt 0 ]; then
+ case "$1" in
verbose | -v | --verbose)
- hideok=
- shift
- ;;
- esac
+ hideok=
+ shift
+ ;;
+ esac
fi
-if [ "$#" = 0 ]
-then
- echo "MUST give path to base image for testing" 1>&2
- exit 1
+if [ "$#" = 0 ]; then
+ echo "MUST give path to base image for testing" 1>&2
+ exit 1
fi
base_image="$1"
shift
-got_cargo_cmd()
-{
- cargo --list | grep " $1 " > /dev/null
+got_cargo_cmd() {
+ cargo --list | grep " $1 " >/dev/null
}
$hideok cargo build --all-targets
@@ -33,10 +30,10 @@ got_cargo_cmd clippy && cargo clippy -q
got_cargo_cmd fmt && $hideok cargo fmt -- --check
$hideok cargo test
-subplot docgen vmadm.md -o vmadm.html
-subplot docgen vmadm.md -o vmadm.pdf
+subplot docgen vmadm.subplot -o vmadm.html
+subplot docgen vmadm.subplot -o vmadm.pdf
-subplot codegen vmadm.md -o test.py
+subplot codegen vmadm.subplot -o test.py
rm -f test.log
$hideok python3 test.py --log test.log --env="BASE_IMAGE=$base_image" "$@"
diff --git a/vmadm.md b/vmadm.md
index e24e0db..7d5ae96 100644
--- a/vmadm.md
+++ b/vmadm.md
@@ -1,19 +1,3 @@
----
-title: "vmadm &ndash; virtual machine administration"
-author: "Lars Wirzenius"
-bindings:
- - subplot/vmadm.yaml
- - lib/files.yaml
- - lib/runcmd.yaml
-impls:
- python:
- - subplot/vmadm.py
- - lib/files.py
- - lib/runcmd.py
-classes:
-- json
-...
-
# Data files for scenarios
This section has some data files used by scenarios.
diff --git a/vmadm.subplot b/vmadm.subplot
new file mode 100644
index 0000000..ef76a9e
--- /dev/null
+++ b/vmadm.subplot
@@ -0,0 +1,15 @@
+title: "vmadm &ndash; virtual machine administration"
+author: "Lars Wirzenius"
+markdowns:
+ - vmadm.md
+bindings:
+ - subplot/vmadm.yaml
+ - lib/files.yaml
+ - lib/runcmd.yaml
+impls:
+ python:
+ - subplot/vmadm.py
+ - lib/files.py
+ - lib/runcmd.py
+classes:
+- json