From b0d0c3f55def4605b80bc94156bbcf36ee8fcd87 Mon Sep 17 00:00:00 2001 From: Janik von Rotz Date: Thu, 3 Jul 2025 16:46:32 +0200 Subject: [PATCH] fix(task): rename delete-git-folder to remove-git-folder and add remove-venv command --- CHANGELOG.md | 3 ++- task | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7083c65f..87c89d23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,10 @@ All notable changes to this project will be documented in this file. The format * Export import website data with `export-website-data` and `import-website-data`. * Odoo image scripts `setup-tests` and `run-tests`. -* Extended `test-project` with module tests +* Extended `test-project` with module tests. * New command `exec` to run commands in containers. * New env var to include and exclude modules for tests. +* Command `reset-venv`. ### Fixed diff --git a/task b/task index ddbc0677..a59921b9 100755 --- a/task +++ b/task @@ -45,7 +45,6 @@ function help-table() { printf "$COLUMN" "create-revision" "[revision]" "Create new Odoo revision." printf "$COLUMN" "create-snippet" "[id]" "Create snippet from template." printf "$COLUMN" "debug" "[name]" "Debugg application. Options: native." - printf "$COLUMN" "delete-git-folder" "" "Delete all git folders." printf "$COLUMN" "dev-vuepress" "" "Start Vuepress development server." printf "$COLUMN" "disable-mailserver" "[env]" "Disable mail server settings via xmlrpc." printf "$COLUMN" "disable-snippet" "[env][path]" "Disable snippet definition." @@ -105,9 +104,11 @@ function help-table() { printf "$COLUMN" "release-module" "[path]" "Create GitHub release for a module." printf "$COLUMN" "remove" "[name]" "Remove containers and volumes." printf "$COLUMN" "remove-env" "[env]" "Remove environment config." + printf "$COLUMN" "remove-git-folder" "" "Delete all git folders." printf "$COLUMN" "remove-git-submodule" "[path]" "Remove a git submodule." printf "$COLUMN" "remove-module" "[db][name]" "Remove target Odoo module." printf "$COLUMN" "remove-snippet" "[env][path]" "Remove snippet definition." + printf "$COLUMN" "remove-venv" "" "Remove virtualenv." printf "$COLUMN" "rename-env" "[env][env]" "Rename env file." printf "$COLUMN" "record-with-memray" "[name]" "Record application memory usage with memray. Options: native." printf "$COLUMN" "record-with-py-spy" "[pid]" "Record and create flamechart for a process." @@ -302,6 +303,11 @@ function activate-venv() { echo "$(python --version) is active." } +function remove-venv() { + echo "Remove virtualenv venv$ODOO_VERSION." + rm -rf "venv$ODOO_VERSION" +} + function get-addons-path() { set-addons-path echo "$ADDONS_PATH" @@ -2147,7 +2153,7 @@ function list-git-folder() { done } -function delete-git-folder() { +function remove-git-folder() { GIT_FOLDERS=$(ls-git-folder) for GIT_FOLDER in $GIT_FOLDERS; do echo "Delete git folder $GIT_FOLDER."