Convert Markdown to simple link for Fastlane

This commit is contained in:
Sylvia van Os
2021-08-31 20:30:21 +02:00
parent 15339a8c44
commit efba8773c5
2 changed files with 6 additions and 166 deletions

View File

@@ -19,9 +19,10 @@ with open('CHANGELOG.md') as changelog:
if not match:
raise ValueError(f"Invalid version line: {line}")
version_code = match.group(1)
else:
text.append(line)
elif line:
# Turn Markdown [links](to_url) into links (to_url)
text.append(re.sub(r'\[(.*?)\]\((.*?)\)', r'\1 (\2)', line))
for version, description in changelogs.items():
with open(os.path.join("fastlane", "metadata", "android", "en-US", "changelogs", f"{version}.txt"), "w") as fastlane_file:
fastlane_file.write("".join(description).strip())
fastlane_file.write("".join(description).strip())