From f10d9f866d7bde648357444671e6183f829e658b Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 15 Apr 2021 10:55:03 +0300 Subject: fix: pipeline to format subplots --- ci-prod.ick | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/ci-prod.ick b/ci-prod.ick index e5b8e23..f66d94d 100644 --- a/ci-prod.ick +++ b/ci-prod.ick @@ -933,15 +933,24 @@ pipelines: mkdir -p /workspace/publish + # In case we're building Subplot itself, add the Rust + # target/debug directory to $PATH. + PATH="/workspace/src/target/debug:$PATH" + + opts="--resources $(pwd)/src/share" + output=/workspace/publish find src -name "*.md" | while read file do - if sp-meta "$file" | grep -q "^scenario:" - then - base="$(basename "$file" .md)" - sp-docgen "$file" -o /workspace/publish/$base.html - sp-docgen "$file" -o /workspace/publish/$base.pdf - fi + base="$(basename "$file" .md)" + ( + cd "$(dirname "$file")" + if subplot $opts metadata "$base.md" | grep -q "^scenario:" + then + subplot $opts docgen "$base.md" -o "$output/$base.html" + subplot $opts docgen "$base.md" -o "$output/$base.pdf" + fi + ) done find /workspace/publish -type f -exec chmod 0644 '{}' + -- cgit v1.2.1