Skip to content

Commit

Permalink
Fix to request
Browse files Browse the repository at this point in the history
  • Loading branch information
topoftheyear committed Dec 5, 2019
1 parent 1a0210f commit e4e6aa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions wrapper/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,21 @@ def update():
temp_current = current_version.split('.')
temp_remote = remote_version.split('.')
for curv, remv in zip(temp_current, temp_remote):
if 'v' in curv:
curv = curv.replace('v', '')
if 'v' in remv:
remv = remv.replace('v', '')
curv = int(curv.replace('v', ''))
remv = int(remv.replace('v', ''))

if int(curv) < int(remv):
if remv > curv:
break
else:
print("Launcher is up to date.")
print('You are already up to date!')
exit()

print("There is a new version available: v{0}. Downloading update!".format(remote_version))

if not os.path.exists("br_updates"):
os.makedirs("br_updates")

remote_url = "https://api.github.com/repos/topoftheyear/Build-Testing/releases/assets/{0}".format(asset_id)
remote_url = "https://api.github.com/repos/PixPanz/byte_le_royale_2020/releases/assets/{0}".format(asset_id)
local_file = "br_updates/v{0}.pyz".format(remote_version)

if not download_file(local_file, remote_url, auth):
Expand Down
2 changes: 1 addition & 1 deletion wrapper/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v = '0.0.1'
v = '0.0.2'

0 comments on commit e4e6aa7

Please sign in to comment.