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

:ambulance: do_tests.zsh: fix pg_extensions use, and :sparkles: allow setting unaccent to install it

parent de8bb9e7
No related branches found
No related merge requests found
......@@ -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
......
......@@ -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
......
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