diff --git a/NEWS.rst b/NEWS.rst index de8bb9e74b1acaa6710891e547907b1b2219d7dd_TkVXUy5yc3Q=..1f4ef9a3fe02c06621054e996709d1e328ed8938_TkVXUy5yc3Q= 100644 --- 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 index de8bb9e74b1acaa6710891e547907b1b2219d7dd_ZG9fdGVzdHMuenNo..1f4ef9a3fe02c06621054e996709d1e328ed8938_ZG9fdGVzdHMuenNo 100755 --- a/do_tests.zsh +++ b/do_tests.zsh @@ -31,5 +31,4 @@ 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 @@ -35,5 +34,6 @@ 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,7 +122,7 @@ 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 @@ -126,7 +126,9 @@ 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