Skip to content
Snippets Groups Projects
Commit 959d450f authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:pencil: do_tests.zsh: Use pg_extensions env var if it has values

parent 33f6cde5
No related branches found
Tags TAG_7.0.2.0a1
1 merge request!200📝 do_tests.zsh: Use pg_extensions env var if it has values
......@@ -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
-------
......
......@@ -118,4 +118,5 @@
then
extensions+=unaccent
fi
# for super project, read the configuration file
extensions+=($(read_odoo_scripts_configuration_key pg.extensions))
......@@ -121,4 +122,10 @@
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;"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment