Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/19.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Don't throw an exception when there's no property Project:BuildgraphSharedProperties in the config.ini file
14 changes: 9 additions & 5 deletions src/uepyscripts/run/buildgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def run(target: str, arguments: list[str]) -> int:

uat_arguments.append(f"-Project={project.uproject_path}")

automation_scripts_directories = config["Project"]["AutomationScriptsDirectories"]
automation_scripts_directories = config["Project"].get("AutomationScriptsDirectories")
if automation_scripts_directories == "" or automation_scripts_directories is None:
logger.info("No automation scripts directory is set")
else:
Expand All @@ -46,11 +46,15 @@ def run(target: str, arguments: list[str]) -> int:
logger.info(f"Automation Scripts directory set to {automation_scripts_path}")
uat_arguments.append(f"-ScriptDir={automation_scripts_path}")

shared_properties = dict(pair.split("=") for pair in config["Project"]["BuildgraphSharedProperties"].split("+"))
shared_properties_str = config["Project"].get("BuildgraphSharedProperties", "")
if shared_properties_str == "" or shared_properties_str is None:
logger.info("No shared properties to set")
else:
shared_properties = dict(pair.split("=") for pair in shared_properties_str.split("+")) if shared_properties_str else {}

if shared_properties is not None:
for key, value in shared_properties.items():
uat_arguments.append(f"-set:{key}={value}")
if shared_properties is not None:
for key, value in shared_properties.items():
uat_arguments.append(f"-set:{key}={value}")

for arg in arguments:
uat_arguments.append(arg)
Expand Down
Loading