summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-04-15 10:55:03 +0300
committerLars Wirzenius <liw@liw.fi>2021-04-15 10:55:03 +0300
commitf10d9f866d7bde648357444671e6183f829e658b (patch)
tree4be234e80cd7461ddfccbc8b2712f538b7ee0f9f
parentb6901959a7f5241b7f34afadefa4491261a7868c (diff)
downloadliw-ci-f10d9f866d7bde648357444671e6183f829e658b.tar.gz
fix: pipeline to format subplots
-rw-r--r--ci-prod.ick21
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 '{}' +