]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
scripts/poe-tasks: clean added
authorAleš Mrázek <ales.mrazek@nic.cz>
Tue, 27 Aug 2024 13:26:58 +0000 (15:26 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Fri, 6 Sep 2024 22:28:31 +0000 (00:28 +0200)
pyproject.toml
scripts/poe-tasks/clean [new file with mode: 0755]

index da8485c43de8a378ee66322b50e4f71b5969d38f..fefe24aca3ea45baab635996abb2ee4b8ecd2743 100644 (file)
@@ -80,17 +80,8 @@ examples = { cmd = "scripts/poe-tasks/examples", help = "Validate all configurat
 man = {cmd = "scripts/poe-tasks/man", help = "Display Knot Resolver manpage from sources" }
 gen-setuppy = { cmd = "scripts/poe-tasks/gen-setuppy", help = "Generate 'setup.py' file for backwards compatibility" }
 format = { cmd = "scripts/poe-tasks/format", help = "Run code formatter" }
-# tasks runned directly
-fixdeps = { shell = "poetry install; npm install; npm update", help = "Install/update dependencies according to configuration files"}
 kresctl = { cmd = "scripts/poe-tasks/kresctl", help="Run kresctl utility" }
-clean = """
-  rm -rf .coverage
-         .mypy_cache
-         .pytest_cache
-         ./**/__pycache__
-         build
-         dist
-"""
+clean = { cmd = "scripts/poe-tasks/clean", help="Cleanup build directories and files" }
 
 [tool.black]
 line-length = 120
diff --git a/scripts/poe-tasks/clean b/scripts/poe-tasks/clean
new file mode 100755 (executable)
index 0000000..ff69ad6
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+# ensure consistent behaviour
+src_dir="$(dirname "$(realpath "$0")")"
+source $src_dir/utils/_env.sh
+
+echo
+echo Removing mypy, pytest and other cached files 
+echo --------------------------------------------
+rm -vrf .coverage .mypy_cache .pytest_cache
+
+echo
+echo Removing meson build directories and files
+echo ------------------------------------------
+rm -vrf .build_kresd .install_kresd build build_doc dist 
+
+echo
+echo Removing __pycache__ directories and files
+echo ------------------------------------------
+find . -type d -name '__pycache__' -prune -exec rm -vrf {} +