Skip to content

Commit 61b5b54

Browse files
committed
Change render_notes script to allow build types for TfA
1 parent b9cea43 commit 61b5b54

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

scripts/render-notes.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ def render_notes(
3030
tb_notes_filename = f"{version[0:-1]}eta.yml"
3131
tb_notes_directory = "android_beta"
3232

33+
if application == "k9mail":
34+
build_type = "main"
35+
else:
36+
if applicationid == "net.thunderbird.android":
37+
build_type = "release"
38+
elif applicationid == "net.thunderbird.android.beta":
39+
build_type = "beta"
40+
else:
41+
# // throw error
42+
print("Error: Unsupported applicationid")
43+
sys.exit(1)
44+
3345
if os.path.isdir(os.path.expanduser(notesrepo)):
3446
notes_path = os.path.join(
3547
os.path.expanduser(notesrepo), tb_notes_directory, tb_notes_filename
@@ -85,7 +97,7 @@ def render_notes(
8597
render_files = {
8698
"changelog_master": {
8799
"template": "changelog_master.xml",
88-
"outfile": f"./app-{application}/src/main/res/raw/changelog_master.xml",
100+
"outfile": f"./app-{application}/src/{build_type}/res/raw/changelog_master.xml",
89101
"render_data": render_data["releases"][version],
90102
},
91103
"changelog": {

0 commit comments

Comments
 (0)