From f5530f31a9c74adaa48a960364b57fdaaa12053a Mon Sep 17 00:00:00 2001 From: Anton Yarmolenko <37253+rnr@users.noreply.github.com> Date: Thu, 5 Dec 2024 14:20:07 +0100 Subject: [PATCH] chore: edit regex since dev team could be set as empty in project file --- config_script/whitelabel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config_script/whitelabel.py b/config_script/whitelabel.py index baf8c6ee..d09eb53d 100644 --- a/config_script/whitelabel.py +++ b/config_script/whitelabel.py @@ -364,7 +364,7 @@ def set_global_parameter(self, parameter): # define regex rule and replacement string for every possible parameter if parameter == "dev_team": parameter_string = 'DEVELOPMENT_TEAM = '+parameter_value+';' - parameter_regex = 'DEVELOPMENT_TEAM = .{10};' + parameter_regex = 'DEVELOPMENT_TEAM = (.{10}|\"\");' elif parameter == "marketing_version": parameter_string = 'MARKETING_VERSION = '+parameter_value+';' parameter_regex = 'MARKETING_VERSION = .*;' @@ -419,7 +419,7 @@ def set_team_for_target(self, target): config_file_string_out = config_file_string # string and regex for dev team parameter_string = 'DEVELOPMENT_TEAM = '+dev_team+';' - parameter_regex = 'DEVELOPMENT_TEAM = .{10};' + parameter_regex = 'DEVELOPMENT_TEAM = (.{10}|\"\");' # replace all regex findings with new parameters string config_file_string_out = re.sub(parameter_regex, parameter_string, config_file_string) # if something was changed