- 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
23 lines
686 B
Bash
Executable File
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
|