feat: add configurable env_file parameter to git_aggregate function
- Add optional env_file parameter with default value ".env" - Convert relative env_file paths to absolute paths before directory change - Maintain backward compatibility with existing calls - Improve flexibility for different environment file locations
This commit is contained in:
parent
a5f7f2e88c
commit
94a718457b
2
PATCH.md
2
PATCH.md
|
|
@ -4,7 +4,7 @@ Das geht am einfachsten mit **pipx** im "editable mode" (`--editable`), sodass
|
|||
Angenommen, dein Arbeitsverzeichnis ist odoo-openupgrade-wizard, dann führe im Terminal aus:
|
||||
|
||||
```bash
|
||||
pipx install --editable /home/lotzm/odoo-openupgrade-wizard
|
||||
pipx install --editable /home/lotzm/gitea.hobbyhimmel/odoo-openupgrade-wizard
|
||||
```
|
||||
|
||||
Dadurch wird ein Symlink auf dein Arbeitsverzeichnis erstellt und du kannst direkt am Code arbeiten.
|
||||
|
|
|
|||
|
|
@ -83,15 +83,19 @@ def ensure_file_exists_from_template(
|
|||
print(output, file=f)
|
||||
|
||||
|
||||
def git_aggregate(folder_path: Path, config_path: Path, jobs: int):
|
||||
def git_aggregate(folder_path: Path, config_path: Path, jobs: int, env_file: str = ".env"):
|
||||
# Convert relative env_file path to absolute path before changing directory
|
||||
if not os.path.isabs(env_file):
|
||||
env_file = os.path.abspath(env_file)
|
||||
|
||||
args = argparse.Namespace(
|
||||
command="aggregate",
|
||||
config=str(config_path),
|
||||
jobs=jobs,
|
||||
dirmatch=None,
|
||||
do_push=False,
|
||||
expand_env=False,
|
||||
env_file=None,
|
||||
expand_env=True,
|
||||
env_file=env_file,
|
||||
force=True,
|
||||
)
|
||||
with working_directory_keeper:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "odoo-openupgrade-wizard"
|
||||
version = "1.3.1"
|
||||
version = "1.3.1.1"
|
||||
description = "CLI tool to manage Odoo Major Upgrades"
|
||||
authors = [
|
||||
{name = "Sylvain LE GAL", email = "sylvain.legal@grap.coop"},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user