From 4821fe8c0abdae06b7da29047763e6837ace5cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Fri, 5 Apr 2024 10:58:39 +0200 Subject: [PATCH] build: Skip mermaid.js download if it's already present. A new makefile target exists, which will download it. The `make docs` target depends on it. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 02b8e71..f98b938 100644 --- a/Makefile +++ b/Makefile @@ -11,11 +11,12 @@ venv: ## Create the venv python3 -m venv venv develop: venv ## Install the dev dependencies venv/bin/pip install -e ".[dev,docs]" -docs: cog ## Build the docs +docs: cog public/mermaid.min.js ## Build the docs venv/bin/sphinx-build docs public - curl -sL $$(grep mermaid.min.js public/search.html | cut -f 2 -d '"') --output public/mermaid.min.js sed -e 's@https://unpkg.com/mermaid[^"]*"@mermaid.min.js"@' -i public/search.html public/genindex.html sed -e 's@https://unpkg.com/mermaid[^"]*"@../mermaid.min.js"@' -i public/developer/models.html public/developer/overview.html +public/mermaid.min.js: + curl -sL $$(grep mermaid.min.js public/search.html | cut -f 2 -d '"') --output public/mermaid.min.js cog: ## Run cog, to integrate the CLI options to the docs. venv/bin/cog -r docs/*.md tests: venv ## Run the tests