From 8b1cffe0f3c31bbdaa392951f0cba62c9aa33ac4 Mon Sep 17 00:00:00 2001 From: jo Date: Sat, 4 Feb 2023 21:56:25 +0100 Subject: [PATCH] chore(api): add schema target to makefile --- api/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/Makefile b/api/Makefile index f946180cc..421cde911 100644 --- a/api/Makefile +++ b/api/Makefile @@ -6,9 +6,16 @@ CPU_CORES := $(shell N=$$(nproc); echo $$(( $$N > 4 ? 4 : $$N ))) install: poetry install --all-extras +export DJANGO_SETTINGS_MODULE=config.settings.local + lint: poetry run pylint \ --jobs=$(CPU_CORES) \ --output-format=colorized \ --recursive=true \ config funkwhale_api tests + +SCHEMA_FILE ?= schema.yml +schema: + poetry run funkwhale-manage spectacular --file $(SCHEMA_FILE) + if command -v npx > /dev/null; then npx prettier --write $(SCHEMA_FILE); fi