diff options
Diffstat (limited to 'scripts/poe-tasks')
-rwxr-xr-x | scripts/poe-tasks/clean | 2 | ||||
-rwxr-xr-x | scripts/poe-tasks/doc-schema | 15 | ||||
-rw-r--r-- | scripts/poe-tasks/utils/_env.sh | 1 |
3 files changed, 17 insertions, 1 deletions
diff --git a/scripts/poe-tasks/clean b/scripts/poe-tasks/clean index f5d4ca1a..a50044f0 100755 --- a/scripts/poe-tasks/clean +++ b/scripts/poe-tasks/clean @@ -14,7 +14,7 @@ echo echo ------------------------------------------ echo Removing Meson build directories and files echo ------------------------------------------ -rm -vrf "$build_dir" "$KRES_INSTALL_DIR" "$build_doc_dir" build dist +rm -vrf "$build_dir" "$KRES_INSTALL_DIR" "$build_schema_dir" "$build_doc_dir" build dist echo echo ------------------------------------------ diff --git a/scripts/poe-tasks/doc-schema b/scripts/poe-tasks/doc-schema new file mode 100755 index 00000000..4cf5c186 --- /dev/null +++ b/scripts/poe-tasks/doc-schema @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# ensure consistent behaviour +src_dir="$(dirname "$(realpath "$0")")" +source $src_dir/utils/_env.sh + +rm -rf $build_schema_dir > /dev/null +meson setup \ + $build_schema_dir \ + --buildtype=release \ + --prefix=/usr > /dev/null +cp -v $build_schema_dir/python/constants.py $gitroot/python/knot_resolver/constants.py + +python -m knot_resolver.client schema > $gitroot/doc/_static/config.schema.json +rm -rf $build_schema_dir diff --git a/scripts/poe-tasks/utils/_env.sh b/scripts/poe-tasks/utils/_env.sh index b6cbb19e..13ed2d5d 100644 --- a/scripts/poe-tasks/utils/_env.sh +++ b/scripts/poe-tasks/utils/_env.sh @@ -20,6 +20,7 @@ cd $gitroot # build dirs build_dir="$gitroot/.build" build_doc_dir="$gitroot/.build_doc" +build_schema_dir="$gitroot/.build_schema" install_dir="$gitroot/.install" # ensure consistent environment with virtualenv |