diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-15 10:55:03 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-15 10:55:03 +0300 |
commit | f10d9f866d7bde648357444671e6183f829e658b (patch) | |
tree | 4be234e80cd7461ddfccbc8b2712f538b7ee0f9f | |
parent | b6901959a7f5241b7f34afadefa4491261a7868c (diff) | |
download | liw-ci-f10d9f866d7bde648357444671e6183f829e658b.tar.gz |
fix: pipeline to format subplots
-rw-r--r-- | ci-prod.ick | 21 |
1 files 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 '{}' + |