now logging the build system (i forgot earlier)

This commit is contained in:
Karma Riuk
2025-03-01 12:47:18 +01:00
parent 9ac7f9edb2
commit e6f28f1c23

View File

@ -71,6 +71,10 @@ def get_build_file(root: str, repo: str, updates: dict, verbose: bool = False):
if entry.is_file() and entry.name in to_keep: if entry.is_file() and entry.name in to_keep:
if verbose: print(f"Found {entry.name} in {repo} root, so keeping it and returning") if verbose: print(f"Found {entry.name} in {repo} root, so keeping it and returning")
updates["depth_of_build_file"] = 0 updates["depth_of_build_file"] = 0
if entry.name == "build.gradle":
updates["build_system"] = "gradle"
else:
updates["build_system"] = "maven"
return os.path.join(path, entry.name) return os.path.join(path, entry.name)
# List files in the immediate subdirectories # List files in the immediate subdirectories
@ -80,6 +84,10 @@ def get_build_file(root: str, repo: str, updates: dict, verbose: bool = False):
if sub_entry.is_file() and sub_entry.name in to_keep: if sub_entry.is_file() and sub_entry.name in to_keep:
if verbose: print(f"Found {sub_entry.name} in {repo} first level, so keeping it and returning") if verbose: print(f"Found {sub_entry.name} in {repo} first level, so keeping it and returning")
updates["depth_of_build_file"] = 1 updates["depth_of_build_file"] = 1
if entry.name == "build.gradle":
updates["build_system"] = "gradle"
else:
updates["build_system"] = "maven"
return os.path.join(path, entry.name, sub_entry.name) return os.path.join(path, entry.name, sub_entry.name)
updates["error_msg"] = "No build file found" updates["error_msg"] = "No build file found"