mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 13:38:12 +02:00
now logging the build system (i forgot earlier)
This commit is contained in:
@ -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"
|
||||||
|
Reference in New Issue
Block a user