Files
Odoo-Build/images/odoo/bin/aggregate-git-repos
T
Janik von Rotz 069648b278 feat(images/odoo): enforce bash coding conventions and improve git config handling
- 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
2025-10-29 19:03:23 +01:00

23 lines
686 B
Bash
Executable File

#!/usr/bin/env bash
set -e
if [[ -n "$GIT_AUTHOR_NAME" ]]; then
log-entrypoint "Set git config user.name to '$GIT_AUTHOR_NAME'."
git config --global user.name "$GIT_AUTHOR_NAME"
fi
if [[ -n "$GIT_AUTHOR_EMAIL" ]]; then
log-entrypoint "Set git config user.email to '$GIT_AUTHOR_EMAIL'."
git config --global user.email "$GIT_AUTHOR_EMAIL"
fi
if [[ -f "/var/lib/odoo/git/repos.yml" ]]; then
cd /var/lib/odoo/git
log-entrypoint 'Aggregate git repos...'
gitaggregate -c repos.yml --expand-env
elif [[ -f "/var/lib/odoo/git/repos.yaml" ]]; then
cd /var/lib/odoo/git
log-entrypoint 'Aggregate git repos...'
gitaggregate -c repos.yaml --expand-env
fi