File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 11import io
22import os
33import re
4- from pathlib import Path
5-
64import requests
75import shutil
86import subprocess
1311from contextlib import closing
1412from core import utils , COMMAND_LINE_ARGS
1513from packaging import version
14+ from pathlib import Path
1615from typing import Iterable
1716from version import __version__
1817
@@ -138,7 +137,7 @@ def do_update_github() -> int:
138137 current_version = re .sub ('^v' , '' , __version__ )
139138 latest_version = re .sub ('^v' , '' , response .json ()[0 ]["tag_name" ])
140139
141- if version .parse (latest_version ) != version .parse (current_version ):
140+ if version .parse (latest_version ) > version .parse (current_version ):
142141 print ('- Updating myself...' )
143142
144143 zip_url = response .json ()[0 ]['zipball_url' ]
@@ -176,10 +175,7 @@ def do_update_github() -> int:
176175 if rc .returncode :
177176 print (' => Autoupdate failed!' )
178177 return - 1
179- if version .parse (latest_version ) > version .parse (current_version ):
180- print (f' => DCSServerBot updated to the latest version { latest_version } .' )
181- else :
182- print (f' => DCSServerBot reverted back to the previous version { latest_version } .' )
178+ print (f' => DCSServerBot updated to the latest version { latest_version } .' )
183179 else :
184180 print ('- No update found for DCSServerBot.' )
185181 return 0
You can’t perform that action at this time.
0 commit comments