otoolbox 0.7.7__tar.gz → 0.7.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.vscode/launch.json +6 -1
- {otoolbox-0.7.7/src/otoolbox.egg-info → otoolbox-0.7.9}/PKG-INFO +1 -1
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/customer-common +8 -3
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-push-shielded +51 -28
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-sync-shielded +44 -24
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/README.rst +1 -1
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/repositories/__init__.py +35 -21
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/repositories/config.py +1 -0
- otoolbox-0.7.9/src/otoolbox/addons/repositories/export.py +43 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/repositories/git.py +26 -1
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/workspace/data/env +8 -4
- {otoolbox-0.7.7 → otoolbox-0.7.9/src/otoolbox.egg-info}/PKG-INFO +1 -1
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox.egg-info/SOURCES.txt +1 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/tests/test_repositories_git.py +33 -1
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.coveragerc +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.github/copilot-instructions.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.github/workflows/python-package.yml +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.github/workflows/python-publish.yml +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.gitignore +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.logs.txt +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.pre-commit-config.yaml +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.pylintrc +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.pylintrc-mandatory +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.readthedocs.yml +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.vscode/otoolbox_debug_runner.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.vscode/settings.json +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/.vscode/tasks.json +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/AUTHORS.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/CHANGELOG.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/CONTRIBUTING.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/LICENSE +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/LICENSE.txt +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/README.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/customer-config +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/customer-info +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/customer-init +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/customer-shell +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/customer-update +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/customer-update-submodule +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-commit +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-common +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-doctor +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-doctor.bat +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-init-tests +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-pre-commit +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-pull +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-push +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-repo-add-all +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-repo-init +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/bin/otoolbox-tests-by-repo +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/docs/Makefile +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/docs/_static/.gitignore +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/docs/authors.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/docs/changelog.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/docs/conf.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/docs/contributing.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/docs/help-repo.txt +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/docs/index.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/docs/license.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/docs/readme.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/docs/requirements.txt +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/pyproject.toml +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/setup.cfg +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/setup.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/__init__.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/__init__.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/addons/README.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/addons/__init__.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/addons/config.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/addons/constants.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/copilot/README.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/copilot/__init__.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/copilot/copilot_utils.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/copilot/data/agents/Odoo_17_Backend.agent.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/copilot/data/agents/Odoo_18_Backend.agent.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/copilot/data/agents/Odoo_19_Backend.agent.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/copilot/data/copilot-instructions.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/docker/README.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/docker/docker-compose.yml +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/README.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/__init__.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/00-file-and-folders.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/01-global-style.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/02-odoo-patterns.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/03-testing-and-validation.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/04-security-and-secrets.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/05-oca-contributing-reference.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/06-odoo-test-framework-guid.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/07-odoonix-guidline.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/08-copilot-instructions-guideline.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/09-team-playbook.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/help_utils.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/logger/README.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/logger/__init__.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/repositories/README.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/repositories/constants.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/repositories/data/repositories.csv +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/repositories/data/repositories.json +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/repositories/display.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/repositories/util.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/README.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/__init__.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/bulk-add-repos +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/bulk-commit +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/bulk-common +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/bulk-init-tests +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/bulk-pre-commit +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/bulk-pull +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/bulk-push +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/bulk-push-shielded +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/bulk-repo-add-all +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/bulk-repo-init +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/bulk-sync-shielded +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/bulk-tests-by-repo +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/customer-common +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/customer-config +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/customer-info +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/customer-init +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/customer-shell +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/customer-update +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/customer-update-submodule +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/ubuntu-install-apps +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/ubuntu/bin/ubuntu-office-conf +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/unitest/__init__.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/unitest/data/ODOO_TEST_FRAMEWORK_GUIDE.md +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/unitest/data/conftest.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/unitest/data/pytest.ini +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/unitest/unitest_utils.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/vscode/README.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/vscode/__init__.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/vscode/data/odools.toml +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/vscode/data/requirements.txt +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/vscode/data/workspace.json +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/vscode/dev_env.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/vscode/extensions.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/vscode/odoo_conf.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/vscode/odools_conf.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/workspace/README.rst +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/workspace/__init__.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/banner.txt +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/base.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/constants.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/environment.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/utils.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox.egg-info/dependency_links.txt +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox.egg-info/entry_points.txt +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox.egg-info/not-zip-safe +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox.egg-info/requires.txt +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox.egg-info/top_level.txt +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/tests/test_addons.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/tests/test_conftest.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/tests/test_copilot_utils.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/tests/test_doctor_script_packaging.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/tests/test_repositories_config.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/tests/test_utils.py +0 -0
- {otoolbox-0.7.7 → otoolbox-0.7.9}/tox.ini +0 -0
|
@@ -29,12 +29,17 @@
|
|
|
29
29
|
"run verify --tags git",
|
|
30
30
|
"run verify --tags odoo-dev.code-workspace",
|
|
31
31
|
"repo --help",
|
|
32
|
-
"repo list",
|
|
33
32
|
"repo sync-shielded",
|
|
34
33
|
"run init --tags 'odoonix/connector'",
|
|
35
34
|
"repo add 'odoonix/social'",
|
|
36
35
|
"repo add 'odoonix/product'",
|
|
37
36
|
"repo add 'odoo/design-themes'",
|
|
37
|
+
"repo list --help",
|
|
38
|
+
"repo list --no-odoo-addon-folder",
|
|
39
|
+
"repo list --odoo-addon-folder --format=list",
|
|
40
|
+
"repo list",
|
|
41
|
+
"repo list --format=table",
|
|
42
|
+
"repo list --format=list",
|
|
38
43
|
],
|
|
39
44
|
"default": "run update --help"
|
|
40
45
|
}
|
|
@@ -164,9 +164,14 @@ function customer_load_working_dir() {
|
|
|
164
164
|
exit 1
|
|
165
165
|
fi
|
|
166
166
|
|
|
167
|
-
# add save working directory to global safe.directory config to avoid git warnings and errors
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
# add save working directory to global safe.directory config to avoid git warnings and errors
|
|
168
|
+
# when running as different users
|
|
169
|
+
if ! git config --global --get-all safe.directory | grep -qxF "$CUSTOMER_DIR"; then
|
|
170
|
+
git config --global --add safe.directory "$CUSTOMER_DIR"
|
|
171
|
+
fi
|
|
172
|
+
if ! _ot_run_as_worker git config --global --get-all safe.directory | grep -qxF "$CUSTOMER_DIR"; then
|
|
173
|
+
_ot_run_as_worker git config --global --add safe.directory "$CUSTOMER_DIR"
|
|
174
|
+
fi
|
|
170
175
|
|
|
171
176
|
}
|
|
172
177
|
|
|
@@ -70,37 +70,60 @@ done
|
|
|
70
70
|
|
|
71
71
|
_ot_init
|
|
72
72
|
|
|
73
|
-
if [[ -z "$SHIELDED_ORGANIZATION" ]]; then
|
|
74
|
-
_ot_log_error "SHIELDED_ORGANIZATION is not set."
|
|
75
|
-
exit 1
|
|
76
|
-
fi
|
|
77
73
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
74
|
+
function _push_shilded_org(){
|
|
75
|
+
# Get organization as paramter
|
|
76
|
+
SHIELDED_ORGANIZATION=$1
|
|
77
|
+
|
|
78
|
+
if [[ -z "$SHIELDED_ORGANIZATION" ]]; then
|
|
79
|
+
_ot_log_error "SHIELDED_ORGANIZATION is not set, see .evn~ for more detail."
|
|
80
|
+
exit 1
|
|
85
81
|
fi
|
|
86
|
-
done
|
|
87
82
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
fi
|
|
83
|
+
for dir in "$WORKSPACE_ROOT/$SHIELDED_ORGANIZATION"/*; do
|
|
84
|
+
if [[ -d "$dir" ]]; then
|
|
85
|
+
project="$(basename "$dir")"
|
|
86
|
+
_ot_log_info "Pulling project: $project"
|
|
87
|
+
cd "$dir"
|
|
88
|
+
_ot_run_as_worker git pull >> "$LOG_FILE" 2>&1
|
|
89
|
+
fi
|
|
90
|
+
done
|
|
95
91
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
_ot_run_as_worker
|
|
102
|
-
_ot_run_as_worker git add . >> "$LOG_FILE" 2>&1
|
|
103
|
-
_ot_run_as_worker git commit -m "[SYNC] Update to the latest release on ${SYNC_DATE:-$(date +%Y-%m-%d)}" >> "$LOG_FILE" 2>&1 || true
|
|
104
|
-
_ot_run_as_worker git push >> "$LOG_FILE" 2>&1
|
|
92
|
+
_ot_log_info "Syncing changes to shielded organization repositories..."
|
|
93
|
+
cd "$WORKSPACE_ROOT"
|
|
94
|
+
if [[ "$WORKER_USER" == "$CURRENT_USER" ]]; then
|
|
95
|
+
otoolbox repo sync-shielded >> "$LOG_FILE" 2>&1
|
|
96
|
+
else
|
|
97
|
+
_ot_run_as_worker otoolbox repo sync-shielded >> "$LOG_FILE" 2>&1
|
|
105
98
|
fi
|
|
99
|
+
|
|
100
|
+
for dir in "$WORKSPACE_ROOT/$SHIELDED_ORGANIZATION"/*; do
|
|
101
|
+
if [[ -d "$dir" ]]; then
|
|
102
|
+
project="$(basename "$dir")"
|
|
103
|
+
_ot_log_info "Pushing changes to $SHIELDED_ORGANIZATION/$project"
|
|
104
|
+
cd "$dir"
|
|
105
|
+
_ot_run_as_worker git add . >> "$LOG_FILE" 2>&1
|
|
106
|
+
_ot_run_as_worker git commit -m "[SYNC] Update to the latest release on ${SYNC_DATE:-$(date +%Y-%m-%d)}" >> "$LOG_FILE" 2>&1 || true
|
|
107
|
+
_ot_run_as_worker git push >> "$LOG_FILE" 2>&1
|
|
108
|
+
fi
|
|
109
|
+
done
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
if [[ -z "${PROTECTED_ORGANIZATIONS-}" ]]; then
|
|
119
|
+
_ot_log_error "PROTECTED_ORGANIZATIONS is not set. Please define it with one or more organization names."
|
|
120
|
+
exit 1
|
|
121
|
+
fi
|
|
122
|
+
|
|
123
|
+
# convert to array (handles both single value and space-separated list)
|
|
124
|
+
read -r -a _protected_orgs <<< "$PROTECTED_ORGANIZATIONS"
|
|
125
|
+
|
|
126
|
+
for _org in "${_protected_orgs[@]}"; do
|
|
127
|
+
_ot_log_info "Processing shielded organization: $_org"
|
|
128
|
+
_push_shilded_org "$_org"
|
|
106
129
|
done
|
|
@@ -76,32 +76,52 @@ done
|
|
|
76
76
|
|
|
77
77
|
_ot_init
|
|
78
78
|
|
|
79
|
-
if [[ -z "$SHIELDED_ORGANIZATION" ]]; then
|
|
80
|
-
_ot_log_error "SHIELDED_ORGANIZATION is not set."
|
|
81
|
-
exit 1
|
|
82
|
-
fi
|
|
83
79
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
else
|
|
91
|
-
_ot_log_info "Skipping pull phase (--no-pull enabled)."
|
|
92
|
-
fi
|
|
80
|
+
function _sync_shilded_organization(){
|
|
81
|
+
SHIELDED_ORGANIZATION=$1
|
|
82
|
+
if [[ -z "$SHIELDED_ORGANIZATION" ]]; then
|
|
83
|
+
_ot_log_error "SHIELDED_ORGANIZATION is not set."
|
|
84
|
+
exit 1
|
|
85
|
+
fi
|
|
93
86
|
|
|
94
|
-
|
|
87
|
+
if [[ "$NO_PULL" != "true" ]]; then
|
|
88
|
+
_ot_log_info "Running otoolbox-pull before sync..."
|
|
89
|
+
pull_args=()
|
|
90
|
+
[[ "$DEBUG" == "true" ]] && pull_args+=("--debug")
|
|
91
|
+
[[ "$DEBUG" != "true" && "$VERBOSE" == "true" ]] && pull_args+=("--verbose")
|
|
92
|
+
"$SCRIPT_PATH/otoolbox-pull" "${pull_args[@]}"
|
|
93
|
+
else
|
|
94
|
+
_ot_log_info "Skipping pull phase (--no-pull enabled)."
|
|
95
|
+
fi
|
|
95
96
|
|
|
96
|
-
|
|
97
|
-
if [[ -d "$dir" ]]; then
|
|
98
|
-
project="$(basename "$dir")"
|
|
99
|
-
_ot_log_info "Processing project: $project"
|
|
100
|
-
_ot_log_info "Pushing changes to $SHIELDED_ORGANIZATION/$project"
|
|
97
|
+
_ot_run_as_worker otoolbox repo sync-shielded >> "$LOG_FILE" 2>&1
|
|
101
98
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
99
|
+
for dir in "$WORKSPACE_ROOT/$SHIELDED_ORGANIZATION"/*/; do
|
|
100
|
+
if [[ -d "$dir" ]]; then
|
|
101
|
+
project="$(basename "$dir")"
|
|
102
|
+
_ot_log_info "Processing project: $project"
|
|
103
|
+
_ot_log_info "Pushing changes to $SHIELDED_ORGANIZATION/$project"
|
|
104
|
+
|
|
105
|
+
_ot_run_as_worker git -C "$dir" pull >> "$LOG_FILE" 2>&1
|
|
106
|
+
_ot_run_as_worker git -C "$dir" add . >> "$LOG_FILE" 2>&1
|
|
107
|
+
_ot_run_as_worker git -C "$dir" commit -m "[SYNC] Update to the latest release on ${SYNC_DATE:-$(date +%Y-%m-%d)}" >> "$LOG_FILE" 2>&1 || true
|
|
108
|
+
_ot_run_as_worker git -C "$dir" push >> "$LOG_FILE" 2>&1
|
|
109
|
+
fi
|
|
110
|
+
done
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
if [[ -z "${PROTECTED_ORGANIZATIONS-}" ]]; then
|
|
117
|
+
_ot_log_error "PROTECTED_ORGANIZATIONS is not set. Please define it with one or more organization names."
|
|
118
|
+
exit 1
|
|
119
|
+
fi
|
|
120
|
+
|
|
121
|
+
# convert to array (handles both single value and space-separated list)
|
|
122
|
+
read -r -a _protected_orgs <<< "$PROTECTED_ORGANIZATIONS"
|
|
123
|
+
|
|
124
|
+
for _org in "${_protected_orgs[@]}"; do
|
|
125
|
+
_ot_log_info "Processing shielded organization: $_org"
|
|
126
|
+
_sync_shilded_organization "$_org"
|
|
107
127
|
done
|
|
@@ -136,7 +136,7 @@ Customer Repositories
|
|
|
136
136
|
CONTINUE_ON_EXCEPTION="True"
|
|
137
137
|
SSH_AUTH="True"
|
|
138
138
|
PUBLIC_ORGANIZATION="odoonix"
|
|
139
|
-
|
|
139
|
+
PROTECTED_ORGANIZATIONS=("moonsunsoft")
|
|
140
140
|
WORKER_USER="worker"
|
|
141
141
|
CUSTOMER_ROOT_DIR="/path/to/folder/Customers"
|
|
142
142
|
|
|
@@ -28,6 +28,7 @@ from otoolbox import utils
|
|
|
28
28
|
from otoolbox.constants import (
|
|
29
29
|
RESOURCE_PRIORITY_ROOT,
|
|
30
30
|
RESOURCE_TAGS_GIT,
|
|
31
|
+
PROCESS_SUCCESS,
|
|
31
32
|
)
|
|
32
33
|
|
|
33
34
|
from otoolbox.addons.repositories.constants import (
|
|
@@ -35,7 +36,10 @@ from otoolbox.addons.repositories.constants import (
|
|
|
35
36
|
RESOURCE_REPOSITORIES_PATH,
|
|
36
37
|
)
|
|
37
38
|
from otoolbox.addons.repositories import config, util
|
|
38
|
-
|
|
39
|
+
from otoolbox.addons.repositories.export import (
|
|
40
|
+
export_console_table,
|
|
41
|
+
export_console_list
|
|
42
|
+
)
|
|
39
43
|
###################################################################
|
|
40
44
|
# Utils
|
|
41
45
|
###################################################################
|
|
@@ -82,32 +86,42 @@ app.__cli_name__ = "repo"
|
|
|
82
86
|
|
|
83
87
|
|
|
84
88
|
@app.command(name="list")
|
|
85
|
-
def command_list(
|
|
89
|
+
def command_list(
|
|
90
|
+
format: Annotated[
|
|
91
|
+
str,
|
|
92
|
+
typer.Option(
|
|
93
|
+
help="Export list of repositories in many format."
|
|
94
|
+
),
|
|
95
|
+
] = "table",
|
|
96
|
+
odoo_addon_folder: Annotated[
|
|
97
|
+
bool,
|
|
98
|
+
typer.Option(
|
|
99
|
+
help="Filter empty odoo repositoires."
|
|
100
|
+
),
|
|
101
|
+
] = True,
|
|
102
|
+
):
|
|
86
103
|
"""Print list of repositories"""
|
|
87
|
-
table = Table(title="Repositories")
|
|
88
|
-
table.add_column("Parent", justify="left", style="cyan", no_wrap=True)
|
|
89
|
-
table.add_column("Title", justify="left", style="green", no_wrap=True)
|
|
90
|
-
table.add_column("Mirror", justify="left", style="green", no_wrap=True)
|
|
91
|
-
table.add_column("Tags", justify="left", style="green", no_wrap=True)
|
|
92
|
-
|
|
93
104
|
repo_list = env.resources.filter(
|
|
94
105
|
lambda resource: resource.has_tag(RESOURCE_TAGS_GIT)
|
|
95
106
|
)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
organization=repo.linked_shielded_organization,
|
|
103
|
-
)
|
|
104
|
-
if repo.has_mirror
|
|
105
|
-
else "N/A",
|
|
106
|
-
", ".join([str(tag) for tag in repo.tags]),
|
|
107
|
+
|
|
108
|
+
if odoo_addon_folder:
|
|
109
|
+
repo_list = repo_list.filter(
|
|
110
|
+
lambda resource: git.is_not_empty_odoo_addons_repository(
|
|
111
|
+
resource
|
|
112
|
+
)[0] == PROCESS_SUCCESS
|
|
107
113
|
)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
if format == "table":
|
|
117
|
+
export_console_table(repo_list)
|
|
118
|
+
return
|
|
119
|
+
|
|
120
|
+
if format == "list":
|
|
121
|
+
export_console_list(repo_list)
|
|
122
|
+
return
|
|
108
123
|
|
|
109
|
-
|
|
110
|
-
console.print(table)
|
|
124
|
+
raise Exception(f"Fromate {format} not suportet")
|
|
111
125
|
|
|
112
126
|
|
|
113
127
|
@app.command(name="add")
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
from rich.console import Console
|
|
4
|
+
from rich.table import Table
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def export_console_table(repo_list):
|
|
10
|
+
table = Table(title="Repositories")
|
|
11
|
+
table.add_column("Parent", justify="left", style="cyan", no_wrap=True)
|
|
12
|
+
table.add_column("Title", justify="left", style="green", no_wrap=True)
|
|
13
|
+
table.add_column("Mirror", justify="left", style="green", no_wrap=True)
|
|
14
|
+
table.add_column("Tags", justify="left", style="green", no_wrap=True)
|
|
15
|
+
|
|
16
|
+
for repo in repo_list:
|
|
17
|
+
table.add_row(
|
|
18
|
+
repo.parent,
|
|
19
|
+
repo.title,
|
|
20
|
+
"{repository}/{organization}".format(
|
|
21
|
+
repository=repo.linked_shielded_repository,
|
|
22
|
+
organization=repo.linked_shielded_organization,
|
|
23
|
+
)
|
|
24
|
+
if repo.has_mirror
|
|
25
|
+
else "N/A",
|
|
26
|
+
", ".join([str(tag) for tag in repo.tags]),
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
console = Console()
|
|
30
|
+
console.print(table)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def export_console_list(repo_list):
|
|
35
|
+
console = Console()
|
|
36
|
+
for repo in repo_list:
|
|
37
|
+
console.print("{organization}/{repository}".format(
|
|
38
|
+
repository=repo.title,
|
|
39
|
+
organization=repo.parent,
|
|
40
|
+
))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
@@ -8,7 +8,12 @@ from pathlib import Path
|
|
|
8
8
|
from otoolbox import env
|
|
9
9
|
from otoolbox import utils
|
|
10
10
|
from otoolbox.base import Resource
|
|
11
|
-
from otoolbox.constants import
|
|
11
|
+
from otoolbox.constants import (
|
|
12
|
+
PROCESS_SUCCESS,
|
|
13
|
+
PROCESS_FAIL,
|
|
14
|
+
PROCESS_WAR,
|
|
15
|
+
PROCESS_EMPTY_MESSAGE
|
|
16
|
+
)
|
|
12
17
|
from otoolbox.addons.repositories.constants import (
|
|
13
18
|
GIT_ADDRESS_HTTPS,
|
|
14
19
|
GIT_ADDRESS_SSH,
|
|
@@ -417,3 +422,23 @@ def is_repository_branch_match_with_odoo_version(context: Resource):
|
|
|
417
422
|
PROCESS_FAIL,
|
|
418
423
|
f"Repository branch '{branch_name}' does not match with Odoo version '{odoo_version}'.",
|
|
419
424
|
)
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
def is_not_empty_odoo_addons_repository(context: Resource):
|
|
428
|
+
"""Check repository contains at least one Odoo addon.
|
|
429
|
+
|
|
430
|
+
An Odoo addon is considered valid when a subdirectory contains
|
|
431
|
+
a ``__manifest__.py`` file.
|
|
432
|
+
"""
|
|
433
|
+
repository_path = env.get_workspace_path(context.path)
|
|
434
|
+
|
|
435
|
+
if not os.path.isdir(repository_path):
|
|
436
|
+
return PROCESS_FAIL, f"Repository path does not exist: {repository_path}"
|
|
437
|
+
|
|
438
|
+
for current_root, dirnames, filenames in os.walk(repository_path):
|
|
439
|
+
# Skip VCS internals for faster scan and to avoid false positives.
|
|
440
|
+
dirnames[:] = [dirname for dirname in dirnames if dirname != ".git"]
|
|
441
|
+
if current_root != repository_path and "__manifest__.py" in filenames:
|
|
442
|
+
return PROCESS_SUCCESS, PROCESS_EMPTY_MESSAGE
|
|
443
|
+
|
|
444
|
+
return PROCESS_WAR, "There is no Odoo addon in the repository"
|
|
@@ -18,13 +18,17 @@ REPOSITORIES=()
|
|
|
18
18
|
|
|
19
19
|
# Protected Git
|
|
20
20
|
#-----------------------------------------------------------------------------
|
|
21
|
+
|
|
22
|
+
# Worker user
|
|
23
|
+
# This user is used to work with shielded organizations.
|
|
21
24
|
WORKER_USER="worker"
|
|
22
25
|
|
|
23
|
-
# Git organizations
|
|
24
|
-
PROTECTED_ORGANIZATIONS=("moonsun")
|
|
25
26
|
|
|
26
|
-
#
|
|
27
|
-
|
|
27
|
+
# Protected Repositories
|
|
28
|
+
# Protected organization is where our customer keep and manage codes. We
|
|
29
|
+
# paln to protect our company from thaire. So, git histories are removed
|
|
30
|
+
# and then push to theair organization. list them here
|
|
31
|
+
PROTECTED_ORGANIZATIONS=("moonsunsoft")
|
|
28
32
|
|
|
29
33
|
|
|
30
34
|
|
|
@@ -101,6 +101,7 @@ src/otoolbox/addons/repositories/__init__.py
|
|
|
101
101
|
src/otoolbox/addons/repositories/config.py
|
|
102
102
|
src/otoolbox/addons/repositories/constants.py
|
|
103
103
|
src/otoolbox/addons/repositories/display.py
|
|
104
|
+
src/otoolbox/addons/repositories/export.py
|
|
104
105
|
src/otoolbox/addons/repositories/git.py
|
|
105
106
|
src/otoolbox/addons/repositories/util.py
|
|
106
107
|
src/otoolbox/addons/repositories/data/repositories.csv
|
|
@@ -3,7 +3,7 @@ from types import SimpleNamespace
|
|
|
3
3
|
import pytest
|
|
4
4
|
|
|
5
5
|
from otoolbox import env
|
|
6
|
-
from otoolbox.constants import PROCESS_SUCCESS
|
|
6
|
+
from otoolbox.constants import PROCESS_SUCCESS, PROCESS_WAR
|
|
7
7
|
from otoolbox.addons.repositories import git
|
|
8
8
|
|
|
9
9
|
|
|
@@ -196,3 +196,35 @@ def test_git_link_to_repositories_root_creates_worktree_when_missing(
|
|
|
196
196
|
(["worktree", "prune"], root_repo_path),
|
|
197
197
|
(["worktree", "add", workspace_repo_path, "origin/17.0"], root_repo_path),
|
|
198
198
|
]
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def test_is_not_empty_odoo_addons_repository_success_when_manifest_in_subdir(
|
|
202
|
+
monkeypatch, tmp_path
|
|
203
|
+
):
|
|
204
|
+
monkeypatch.setitem(env.context, "path", str(tmp_path))
|
|
205
|
+
context = SimpleNamespace(path="moonsunsoft/payment")
|
|
206
|
+
repo_path = tmp_path / "moonsunsoft" / "payment"
|
|
207
|
+
addon_path = repo_path / "payment_gateway"
|
|
208
|
+
addon_path.mkdir(parents=True)
|
|
209
|
+
(addon_path / "__manifest__.py").write_text("{}", encoding="utf-8")
|
|
210
|
+
|
|
211
|
+
result, message = git.is_not_empty_odoo_addons_repository(context)
|
|
212
|
+
|
|
213
|
+
assert result == PROCESS_SUCCESS
|
|
214
|
+
assert message == ""
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
def test_is_not_empty_odoo_addons_repository_warn_when_no_manifest_in_subdir(
|
|
218
|
+
monkeypatch, tmp_path
|
|
219
|
+
):
|
|
220
|
+
monkeypatch.setitem(env.context, "path", str(tmp_path))
|
|
221
|
+
context = SimpleNamespace(path="moonsunsoft/payment")
|
|
222
|
+
repo_path = tmp_path / "moonsunsoft" / "payment"
|
|
223
|
+
repo_path.mkdir(parents=True)
|
|
224
|
+
# Manifest at repository root does not define an addon folder.
|
|
225
|
+
(repo_path / "__manifest__.py").write_text("{}", encoding="utf-8")
|
|
226
|
+
|
|
227
|
+
result, message = git.is_not_empty_odoo_addons_repository(context)
|
|
228
|
+
|
|
229
|
+
assert result == PROCESS_WAR
|
|
230
|
+
assert message == "There is no Odoo addon in the repository"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/copilot/data/agents/Odoo_17_Backend.agent.md
RENAMED
|
File without changes
|
{otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/copilot/data/agents/Odoo_18_Backend.agent.md
RENAMED
|
File without changes
|
{otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/copilot/data/agents/Odoo_19_Backend.agent.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/03-testing-and-validation.md
RENAMED
|
File without changes
|
{otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/04-security-and-secrets.md
RENAMED
|
File without changes
|
|
File without changes
|
{otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/help/data/docs/06-odoo-test-framework-guid.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{otoolbox-0.7.7 → otoolbox-0.7.9}/src/otoolbox/addons/unitest/data/ODOO_TEST_FRAMEWORK_GUIDE.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|