Changed paths to updater so it will use the same methods for both stable and alpha versions
This commit is contained in:
parent
c4d89faa33
commit
10fcedf537
@ -23,9 +23,9 @@ bts_access_token = "U29jaWFsaXplcg"
|
||||
bts_url = "https://issues.manuelcortez.net"
|
||||
### Update information
|
||||
# URL to retrieve the latest updates for the stable branch.
|
||||
update_stable_url = "https://code.manuelcortez.net/manuelcortez/socializer/raw/master/update-files/socializer.json"
|
||||
update_stable_url = "http://socializer.su/static/files/update/stable.json"
|
||||
# URL to retrieve update information for the "next" branch. This is a channel made for alpha versions.
|
||||
# Every commit will trigger an update, so users wanting to have the bleeding edge code will get it as soon as it is committed here and build by a runner.
|
||||
update_next_url = "https://code.manuelcortez.net/api/v4/projects/4/repository/commits/master"
|
||||
update_next_url = "http://socializer.su/static/files/update/alpha.json"
|
||||
# Short_id of the last commit, this is set to none here because it will be set manually by the building tools.
|
||||
update_next_version = "03286a44"
|
@ -65,21 +65,11 @@ def find_version_data(update_type, current_version, available_update):
|
||||
update_url = available_update ['downloads'][platform.system()+platform.architecture()[0][:2]]
|
||||
return (available_version, available_description, update_url)
|
||||
else: # Unstable versions, based in commits instead of version numbers.
|
||||
# A condition for this to work is a successful ran of a pipeline.
|
||||
if "status" not in available_update:
|
||||
return (False, False, False)
|
||||
if "status" in available_update and available_update["status"] != "success":
|
||||
return (False, False, False)
|
||||
available_version = available_update["short_id"]
|
||||
available_version = available_update["current_version"]
|
||||
if available_version == current_version:
|
||||
return (False, False, False)
|
||||
available_description = available_update["message"]
|
||||
# ToDo: simplify this so it can be reused in other projects.
|
||||
import platform
|
||||
if platform.architecture()[0][:2] == "32":
|
||||
update_url = "https://code.manuelcortez.net/manuelcortez/socializer/-/jobs/artifacts/master/raw/socializer_x86.zip?job=alpha32"
|
||||
else:
|
||||
update_url = "https://code.manuelcortez.net/manuelcortez/socializer/-/jobs/artifacts/master/raw/socializer_x64.zip?job=alpha64"
|
||||
available_description = available_update["description"]
|
||||
update_url = available_update ['downloads'][platform.system()+platform.architecture()[0][:2]]
|
||||
return (available_version, available_description, update_url)
|
||||
|
||||
def download_update(update_url, update_destination, requests_session, progress_callback=None, chunk_size=io.DEFAULT_BUFFER_SIZE):
|
||||
|
Loading…
Reference in New Issue
Block a user