rename deep to unshallow and add a depth parameter

This commit is contained in:
joda-odoo 2024-02-20 11:37:26 +01:00
parent 773ab0b8f5
commit cc381629fa

View file

@ -96,7 +96,8 @@ _project: Optional["Project"] = None
class Extern(DataClassJsonMixin): class Extern(DataClassJsonMixin):
git: str git: str
tag: str tag: str
deep: bool = dt.field(default=False) shallow: bool = dt.field(default=True)
depth: int = dt.field(default=1)
@dt.dataclass @dt.dataclass
@ -161,8 +162,8 @@ class Project(Manifest):
extPath, extPath,
] ]
if not ext.deep: if ext.shallow:
cmd += ["--depth", "1"] cmd += ["--depth", str(ext.depth)]
shell.exec(*cmd, quiet=True) shell.exec(*cmd, quiet=True)
project = Project.at(Path(extPath)) project = Project.at(Path(extPath))