# HG changeset patch # User Vincent Hatakeyama <vincent.hatakeyama@xcg-consulting.fr> # Date 1698061545 -7200 # Mon Oct 23 13:45:45 2023 +0200 # Node ID 959d450fc1714433d4442d1217d8d823900f7d4a # Parent 33f6cde57d03d2ea58bf330f8e8cec017922130a 📠do_tests.zsh: Use pg_extensions env var if it has values diff --git a/NEWS.rst b/NEWS.rst --- a/NEWS.rst +++ b/NEWS.rst @@ -2,6 +2,12 @@ History ======= +20.11.0 +------- + +do_tests.zsh: allow using env var pg_extension 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 @@ -118,7 +118,14 @@ then extensions+=unaccent fi +# for super project, read the configuration file 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" ]]; +then + extensions+=( ${(s: :)pg_extensions} ) +fi 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;"