Skip to content

Commit 5de16ac

Browse files
committed
Updates python script to upgrade app version
1 parent 3239a9f commit 5de16ac

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

ci/release-tag.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@
44
from github import Auth
55

66

7+
def update_app_version(repo: Repo, version: str):
8+
file_name = "src/PlexRichPresence.UI.Avalonia/PlexRichPresence.UI.Avalonia.csproj"
9+
lines = open(file_name, "r").readlines()
10+
lines[6] = " <Version>2.1.0</Version>"
11+
out = open(file_name, "w")
12+
out.writelines(lines)
13+
out.close()
14+
15+
repo.index.add(file_name)
16+
commit = repo.index.commit("Update app version : " + version)
17+
repo.remotes.origin.push()
18+
19+
720
def get_next_version(current_version: str) -> str:
821
version_parts = current_version.split(".")
922

@@ -35,10 +48,11 @@ def get_current_version(github_token: str) -> str:
3548
print("Next version : " + new_version)
3649

3750
repo: Repo = Repo(".")
51+
update_app_version(repo, new_version)
3852
new_tag: TagReference = repo.create_tag(
3953
new_version, message='Version "{0}"'.format(new_version)
4054
)
41-
_ = repo.remotes.origin.push(new_tag.name)
55+
repo.remotes.origin.push(new_tag.name)
4256

4357
with open("version.txt", "a") as f:
4458
f.write(new_version)

0 commit comments

Comments
 (0)