From c31c5dc69dfd41361875f24f4dcf2eef082b1072 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 14 Dec 2024 08:57:45 -0800 Subject: [PATCH] chore(just): split schemagen into windows and nixos jobs --- justfile | 15 +++++++++------ shell.nix | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/justfile b/justfile index d1da394e1..298110f01 100644 --- a/justfile +++ b/justfile @@ -1,4 +1,5 @@ set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"] + export RUST_BACKTRACE := "full" clean: @@ -45,13 +46,15 @@ docgen: cargo run --package komorebic -- docgen Get-ChildItem -Path "docs/cli" -Recurse -File | ForEach-Object { (Get-Content $_.FullName) -replace 'Usage: ', 'Usage: komorebic.exe ' | Set-Content $_.FullName } -schemagen: +jsonschema: cargo run --package komorebic -- static-config-schema > schema.json cargo run --package komorebic -- application-specific-configuration-schema > schema.asc.json cargo run --package komorebi-bar -- --schema > schema.bar.json - generate-schema-doc .\schema.json --config template_name=js_offline --config minify=false .\static-config-docs\ - generate-schema-doc .\schema.bar.json --config template_name=js_offline --config minify=false .\bar-config-docs\ - - rm -Force .\bar-config-docs\schema.html - mv .\bar-config-docs\schema.bar.html .\bar-config-docs\schema.html +# this part is run in a nix shell because python is a nightmare +schemagen: + rm -rf static-config-docs bar-config-docs + mkdir -p static-config-docs bar-config-docs + generate-schema-doc ./schema.json --config template_name=js_offline --config minify=false ./static-config-docs/ + generate-schema-doc ./schema.bar.json --config template_name=js_offline --config minify=false ./bar-config-docs/ + mv ./bar-config-docs/schema.bar.html ./bar-config-docs/schema.html diff --git a/shell.nix b/shell.nix index a826362a1..3261c5e6e 100644 --- a/shell.nix +++ b/shell.nix @@ -7,5 +7,6 @@ with pkgs; python311Packages.mkdocs-material python311Packages.mkdocs-macros python311Packages.setuptools + python311Packages.json-schema-for-humans ]; }