Deep instead of depth
This commit is contained in:
parent
1a7c2c475a
commit
b0c8ee351f
|
@ -97,7 +97,7 @@ _project: Optional["Project"] = None
|
|||
class Extern(DataClassJsonMixin):
|
||||
git: str
|
||||
tag: str
|
||||
depth: Optional[Union[int, str]] = None
|
||||
deep: bool = dt.field(default=False)
|
||||
|
||||
|
||||
@dt.dataclass
|
||||
|
@ -162,14 +162,8 @@ class Project(Manifest):
|
|||
extPath,
|
||||
]
|
||||
|
||||
if ext.depth is None:
|
||||
if not ext.deep:
|
||||
cmd += ["--depth", "1"]
|
||||
elif isinstance(ext.depth, int):
|
||||
cmd += ["--depth", str(ext.depth)]
|
||||
elif ext.depth == "deep":
|
||||
pass
|
||||
else:
|
||||
raise RuntimeError(f"Invalid depth '{ext.depth}'")
|
||||
|
||||
shell.exec(*cmd, quiet=True)
|
||||
project = Project.at(Path(extPath))
|
||||
|
|
|
@ -4,7 +4,7 @@ import docker # type: ignore
|
|||
import os
|
||||
import dataclasses as dt
|
||||
|
||||
from . import cli, model, shell, vt100
|
||||
from . import cli, model, shell, vt100, const
|
||||
|
||||
|
||||
podPrefix = "CK__"
|
||||
|
@ -152,7 +152,7 @@ def _(args: cli.Args):
|
|||
"sleep infinity",
|
||||
name=name,
|
||||
volumes={
|
||||
os.path.abspath(os.path.dirname(__file__)): {
|
||||
const.MODULE_DIR: {
|
||||
"bind": toolingRoot + "/cutekit",
|
||||
"mode": "ro",
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue