- Enforce bash coding conventions across all scripts as outlined in new AGENTS.md - Convert local variables to lowercase and use proper quoting - Update conditionals to use `[[ ... ]]` and remove `function` keyword - Add support for setting git author name and email via env vars - Improve SSH key handling and git operations - Update documentation and changelog to reflect changes
21 lines
733 B
Bash
Executable File
21 lines
733 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
if [[ -n "$ODOO_DATABASE" ]]; then
|
|
if check-database-initialized; then
|
|
log-entrypoint "Update modules list on database $ODOO_DATABASE."
|
|
# Execute Odoo shell command to call base.module.update:update_module()
|
|
(exec odoo shell "${DB_ARGS[@]}" --database "$ODOO_DATABASE" --config "$ODOO_RC" --stop-after-init --no-http << 'EOF'
|
|
updater = env['base.module.update']
|
|
updater.update_module()
|
|
env.cr.commit()
|
|
print('Module list updated successfully.')
|
|
EOF
|
|
) || true
|
|
else
|
|
log-entrypoint "Database $ODOO_DATABASE is not initialized, skipping modules list update."
|
|
fi
|
|
else
|
|
log-entrypoint 'ODOO_DATABASE environment variable not set, skipping modules list update.'
|
|
fi
|