diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-09-09 10:09:40 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-09-09 10:09:40 +0300 |
commit | 2a78d1909ba7ccecad6e07a4b988eb77d4385359 (patch) | |
tree | 05beca8fe80d19ec7e7529389702048eee2ab631 | |
parent | 7feb9f78e51c22ffa8c1cec5fed033e689949576 (diff) | |
download | vmadm-2a78d1909ba7ccecad6e07a4b988eb77d4385359.tar.gz |
fix: use new Subplot external metadata
Sponsored-by: author
-rwxr-xr-x | check | 31 | ||||
-rw-r--r-- | vmadm.md | 16 | ||||
-rw-r--r-- | vmadm.subplot | 15 |
3 files changed, 29 insertions, 33 deletions
@@ -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" "$@" @@ -1,19 +1,3 @@ ---- -title: "vmadm – 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 – 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 |