diff --git a/env_var.sh b/env_var.sh index b13134c..c899ad9 100755 --- a/env_var.sh +++ b/env_var.sh @@ -33,3 +33,7 @@ EL_GITHUB_TOKEN="" EL_MANIFEST_PROD="./default.xml" EL_MANIFEST_DEV="./manifest/git_manifest_erplibre.xml" EL_LANG="fr" +# Verbosité de l'installation (poetry install, repo sync, git daemon). +# 0 = silencieux (défaut), 1 = logs détaillés. On respecte une valeur déjà +# passée en environnement : EL_VERBOSE=1 make install_odoo_18 +EL_VERBOSE="${EL_VERBOSE:-0}" diff --git a/manifest/git_manifest_odoo12.0.xml b/manifest/git_manifest_odoo12.0.xml index 08c03df..340c2cc 100644 --- a/manifest/git_manifest_odoo12.0.xml +++ b/manifest/git_manifest_odoo12.0.xml @@ -753,7 +753,7 @@ name="queue.git" path="odoo12.0/addons/OCA_queue" remote="ERPLibre_origin_OCA" - revision="12.0" + revision="erplibre/12.0" groups="addons,odoo12.0" /> une install qui ÉCHOUE renvoie un + # code non nul (avant, main() ne sortait jamais en erreur : le suivi + # d'installation affichait ✅ même quand poetry/pyenv plantaient). + # Rappel os.system : 0 = succès ; toute autre valeur = échec. + exit_code = 0 status = 0 if ( update.config.install_dev @@ -718,16 +745,31 @@ def main(): status = update.validate_environment() if update.config.install: status = update.install_system() + if status not in (0, True, None): + exit_code = 1 if ( update.config.force_install or update.config.install_dev or update.config.partial_install or update.config.is_in_switch ) and not status: - update.update_environment() + rc = update.update_environment() + if rc not in (0, True, None): + exit_code = 1 update.print_log() - if update.config.install_dev: + # --with_extra : appliquer les modules extra (CybroOdoo) MÊME si l'env de + # base est déjà installé (sinon update_environment est sauté -> « Nothing + # to do » et CybroOdoo n'est jamais ajouté au repo ni à config.conf). + # Placé AVANT la régénération de config (post-étape) pour qu'elle le prenne. + if update.config.with_extra and exit_code == 0: + rc = update.apply_extra_modules() + if rc not in (0, True, None): + exit_code = 1 + + # Étapes post-install : uniquement si l'installation a RÉUSSI (sinon + # .venv.erplibre est absent -> cascade d'erreurs inutiles). + if update.config.install_dev and exit_code == 0: # Update pycharm configuration update.pycharm_update() @@ -736,6 +778,8 @@ def main(): "./.venv.erplibre/bin/python ./script/git/git_repo_update_group.py" ) os.system("./script/generate_config.sh") + + return exit_code # TODO ignore this if installation fail # TODO this cause an error at first execution, need to source ./.venv.erplibre/bin/activate and rerun @@ -756,4 +800,4 @@ def die(cond, message, code=1): if __name__ == "__main__": - main() + sys.exit(main() or 0)