Bug 1726216 - Fix thunderbird91-next regex in update_verify_config.py. r=taskgraph-reviewers,jmaher

The missing closing single quote causes update-verify-config-next to fail as
the value is used in a shell commandline.
Added a quick test to look for this kind of error since apparently it is easy
to miss.

Differential Revision: https://phabricator.services.mozilla.com/D122901
This commit is contained in:
Rob Lemley 2021-08-18 15:00:46 +00:00
Родитель 32d33460f7
Коммит 7ef4a400c7
1 изменённых файлов: 18 добавлений и 1 удалений

Просмотреть файл

@ -36,7 +36,7 @@ INCLUDE_VERSION_REGEXES = {
# Previous esr versions, for update testing before we update users to esr91
"esr91-next": r"'^(52|60|68|78)+\.\d+(\.\d+)?esr$'",
# Previous Thunderbird major versions. Same idea as esrXX-next, no esr suffix
"thunderbird91-next": r"'^78\.\d+(\.\d+)?$",
"thunderbird91-next": r"'^78\.\d+(\.\d+)?$'",
}
MAR_CHANNEL_ID_OVERRIDE_REGEXES = {
@ -44,6 +44,23 @@ MAR_CHANNEL_ID_OVERRIDE_REGEXES = {
}
def ensure_wrapped_singlequote(regexes):
"""Ensure that a regex (from INCLUDE_VERSION_REGEXES or MAR_CHANNEL_ID_OVERRIDE_REGEXES)
is wrapper in single quotes.
"""
for name, regex in regexes.items():
if regex[0] != "'" or regex[-1] != "'":
raise Exception(
"Regex {} is invalid: not wrapped with single quotes.\n{}".format(
name, regex
)
)
ensure_wrapped_singlequote(INCLUDE_VERSION_REGEXES)
ensure_wrapped_singlequote(MAR_CHANNEL_ID_OVERRIDE_REGEXES)
@transforms.add
def add_command(config, tasks):
keyed_by_args = [