File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 44from 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+
720def 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:
3548print ("Next version : " + new_version )
3649
3750repo : Repo = Repo ("." )
51+ update_app_version (repo , new_version )
3852new_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
4357with open ("version.txt" , "a" ) as f :
4458 f .write (new_version )
You can’t perform that action at this time.
0 commit comments