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 tags found
No related merge requests found
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
History History
======= =======
20.12.1
-------
do_tests.zsh: Fix pg_extensions use, and allow setting unaccent to install it.
20.12.0 20.12.0
------- -------
...@@ -10,7 +15,7 @@ ...@@ -10,7 +15,7 @@
20.11.0 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. requiring a specific extension.
20.10.1 20.10.1
......
...@@ -31,5 +31,4 @@ ...@@ -31,5 +31,4 @@
dbowner=$(read_configuration_key ${project_home}/conf/dev/odoo.conf options db_user) 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) unaccent=$(read_configuration_key ${project_home}/conf/dev/odoo.conf options unaccent False)
else else
echo "$DEBUG Use default owner and unaccent"
dbowner=odoo dbowner=odoo
...@@ -35,5 +34,6 @@ ...@@ -35,5 +34,6 @@
dbowner=odoo dbowner=odoo
unaccent=False unaccent=${unaccent-False}
echo "$DEBUG Use default owner ($dbowner) and unaccent ($unaccent)"
fi fi
echo "$DEBUG Looking for modules to install" echo "$DEBUG Looking for modules to install"
module_list=${ODOO_SCRIPTS_MODULE_LIST-$(read_odoo_scripts_expandable_configuration_key module_list)} module_list=${ODOO_SCRIPTS_MODULE_LIST-$(read_odoo_scripts_expandable_configuration_key module_list)}
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
extensions+=($(read_odoo_scripts_configuration_key pg.extensions)) extensions+=($(read_odoo_scripts_configuration_key pg.extensions))
# for modules without configuration file, allow environment variable # for modules without configuration file, allow environment variable
# (expected format is space separated extensions # (expected format is space separated extensions
if [[ -z "$pg_extensions" ]]; if [[ -n "$pg_extensions" ]];
then then
extensions+=( ${(s: :)pg_extensions} ) extensions+=( ${(s: :)pg_extensions} )
fi fi
...@@ -126,7 +126,9 @@ ...@@ -126,7 +126,9 @@
then then
extensions+=( ${(s: :)pg_extensions} ) extensions+=( ${(s: :)pg_extensions} )
fi fi
for extension in $extensions; do echo "$DEBUG postgres extensions $extensions"
for extension in $extensions;
do
echo "$INFO Create extension $extension in '$dbname'" echo "$INFO Create extension $extension in '$dbname'"
psql $PG_HOST $PG_USER $dbname -c "CREATE EXTENSION IF NOT EXISTS $extension;" psql $PG_HOST $PG_USER $dbname -c "CREATE EXTENSION IF NOT EXISTS $extension;"
done 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