Skip to content

Commit

Permalink
chore: moved installation of mermaid js tools out of makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
schuur committed Oct 4, 2024
1 parent 542394f commit 6a419a2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
uses: actions/configure-pages@v2
- name: Install Bikeshed
run: pip3 install bikeshed && bikeshed update
- name: Install Mermaid
run: npm install -g @mermaid-js/mermaid-cli
- name: Build specs
run: make -C spec publish && make -C spec/v2 publish && make -C spec/faq publish
- name: Upload artifact
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
index.html
upload/
*.svg
.DS_Store
1 change: 1 addition & 0 deletions spec/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

cd spec/v2
pip3 install bikeshed && bikeshed update
npm list -g @mermaid-js/mermaid-cli || npm install -g @mermaid-js/mermaid-cli
mv header.include header.include_temp
mv header.include_release header.include
rm index.html
Expand Down
8 changes: 3 additions & 5 deletions spec/v2/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Assumes bikeshed is installed (pip3 install bikeshed)
# Assumes mmdc is installed (npm install -g @mermaid-js/mermaid-cli)
DIAGRAMS := $(patsubst %.mmd,%.svg,$(wildcard diagrams/*.mmd))
OUTDIR := ../../upload/v2
MMDC := mmdc
STATUS ?= ""

all: index.html
Expand All @@ -18,14 +19,11 @@ index.html: index.bs $(DIAGRAMS)
bikeshed spec $< $@ --md-text-macro="$(STATUS)"

%.svg: %.mmd $(MMDC)
$(MMDC) -i $< -o $@
mmdc -i $< -o $@

serve: $(DIAGRAMS)
bikeshed serve index.bs

$(MMDC):
npm install -g @mermaid-js/mermaid-cli

pull-metadata:
curl -o computed-metadata.include https://raw.githubusercontent.com/wbcsd/tr/main/data-exchange-protocol/computed-metadata.include

Expand Down

0 comments on commit 6a419a2

Please sign in to comment.