# HG changeset patch # User Vincent Hatakeyama <vincent.hatakeyama@xcg-consulting.fr> # Date 1698075439 -7200 # Mon Oct 23 17:37:19 2023 +0200 # Node ID 1f4ef9a3fe02c06621054e996709d1e328ed8938 # Parent de8bb9e74b1acaa6710891e547907b1b2219d7dd 🚑 do_tests.zsh: fix pg_extensions use, and ✨ allow setting unaccent to install it diff --git a/NEWS.rst b/NEWS.rst --- a/NEWS.rst +++ b/NEWS.rst @@ -2,6 +2,11 @@ History ======= +20.12.1 +------- + +do_tests.zsh: Fix pg_extensions use, and allow setting unaccent to install it. + 20.12.0 ------- @@ -10,7 +15,7 @@ 20.11.0 ------- -do_tests.zsh: allow using env var pg_extension to describe extensions to install. Allow compatibility with modules +do_tests.zsh: allow using env var pg_extensions to describe extensions to install. Allow compatibility with modules requiring a specific extension. 20.10.1 diff --git a/do_tests.zsh b/do_tests.zsh --- a/do_tests.zsh +++ b/do_tests.zsh @@ -31,9 +31,9 @@ dbowner=$(read_configuration_key ${project_home}/conf/dev/odoo.conf options db_user) unaccent=$(read_configuration_key ${project_home}/conf/dev/odoo.conf options unaccent False) else - echo "$DEBUG Use default owner and unaccent" dbowner=odoo - unaccent=False + unaccent=${unaccent-False} + echo "$DEBUG Use default owner ($dbowner) and unaccent ($unaccent)" fi echo "$DEBUG Looking for modules to install" module_list=${ODOO_SCRIPTS_MODULE_LIST-$(read_odoo_scripts_expandable_configuration_key module_list)} @@ -122,11 +122,13 @@ extensions+=($(read_odoo_scripts_configuration_key pg.extensions)) # for modules without configuration file, allow environment variable # (expected format is space separated extensions -if [[ -z "$pg_extensions" ]]; +if [[ -n "$pg_extensions" ]]; then extensions+=( ${(s: :)pg_extensions} ) fi -for extension in $extensions; do +echo "$DEBUG postgres extensions $extensions" +for extension in $extensions; +do echo "$INFO Create extension $extension in '$dbname'" psql $PG_HOST $PG_USER $dbname -c "CREATE EXTENSION IF NOT EXISTS $extension;" done