feat: requirements-language
This commit is contained in:
@@ -23,6 +23,18 @@ for c in client.containers.list():
|
|||||||
"\\) 2>/dev/null | head -n 5\""
|
"\\) 2>/dev/null | head -n 5\""
|
||||||
)
|
)
|
||||||
req = c.exec_run(find_cmd)[1].decode() # путь до файла с зависимостями
|
req = c.exec_run(find_cmd)[1].decode() # путь до файла с зависимостями
|
||||||
|
req_paths = [line.strip() for line in req.splitlines() if line.strip()]
|
||||||
|
|
||||||
|
language = None
|
||||||
|
for p in req_paths:
|
||||||
|
if "requirements" in p.lower() or p.endswith("Pipfile") or p.endswith("pyproject.toml"):
|
||||||
|
language = "python"
|
||||||
|
break
|
||||||
|
if p.endswith("package.json"):
|
||||||
|
language = "nodejs"
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
container = {
|
container = {
|
||||||
"name": c.name,
|
"name": c.name,
|
||||||
"version": ver,
|
"version": ver,
|
||||||
|
|||||||
Reference in New Issue
Block a user