compare-settings-to-template: Handle prod_settings_template renaming.

This commit is contained in:
Alex Vandiver 2022-04-28 14:19:18 -07:00 committed by Tim Abbott
parent b6b6faa404
commit 3476f63dca
1 changed files with 5 additions and 1 deletions

View File

@ -38,9 +38,13 @@ while url is not None:
if not re.match(r"^\d+\.\d+(\.\d+)?$", tag):
continue
filename = "zproject/prod_settings_template.py"
if [int(x) for x in tag.split(".")] < [1, 4]:
filename = "zproject/local_settings_template.py"
print(f" - {tag}")
resp = requests.get(
f"https://raw.githubusercontent.com/zulip/zulip/{tag}/zproject/prod_settings_template.py",
f"https://raw.githubusercontent.com/zulip/zulip/{tag}/{filename}",
)
if resp.status_code == 200:
templ[tag] = resp.content.decode()