summaryrefslogtreecommitdiff
path: root/ci-prod.ick
diff options
context:
space:
mode:
Diffstat (limited to 'ci-prod.ick')
-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 '{}' +