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