Modified update paths and files in order to deploy the next date based release
This commit is contained in:
parent
1477522681
commit
fd791fe181
@ -1,8 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
python_version = int(sys.version[0])
|
||||
name = "MusicDL"
|
||||
version = "0.7"
|
||||
author = "Manuel Cortéz"
|
||||
authorEmail = "manuel@manuelcortez.net"
|
||||
copyright = "Copyright (C) 2019-2020, Manuel Cortez"
|
||||
@ -14,6 +11,6 @@ translators = [_(u"Manuel Cortez (Spanish)")]
|
||||
bts_name = "music_dl"
|
||||
bts_access_token = "fe3j2ijirvevv9"
|
||||
bts_url = "https://issues.manuelcortez.net"
|
||||
update_stable_url = "https://manuelcortez.net/static/files/music_dl/update/stable.json"
|
||||
update_next_url = "https://manuelcortez.net/static/files/music_dl/update/alpha.json"
|
||||
update_next_version=None
|
||||
update_url = "https://manuelcortez.net/static/files/music_dl/update/latest.json"
|
||||
version = "2020.07.23"
|
||||
update_next_version = "14775226"
|
@ -12,11 +12,7 @@ def do_update(update_type="alpha"):
|
||||
# Updates cannot be performed in the source code version.
|
||||
if hasattr(sys, "frozen") == False:
|
||||
return
|
||||
if update_type == "stable":
|
||||
endpoint = application.update_stable_url
|
||||
version = application.version
|
||||
else:
|
||||
endpoint = application.update_next_url
|
||||
endpoint = application.update_url
|
||||
version = application.update_next_version
|
||||
try:
|
||||
return update.perform_update(endpoint=endpoint, current_version=version, app_name=application.name, update_type=update_type, update_available_callback=available_update_dialog, progress_callback=progress_callback, update_complete_callback=update_finished)
|
||||
|
@ -11,9 +11,20 @@ commit = commit_info["short_id"]
|
||||
print("Got new version info: {commit}".format(commit=commit,))
|
||||
file = open("application.py", "r", encoding="utf-8")
|
||||
lines = file.readlines()
|
||||
lines[-2] = 'version = "{}"\n'.format(commit_info["created_at"][:10].replace("-", "."))
|
||||
lines[-1] = 'update_next_version = "{commit}"'.format(commit=commit,)
|
||||
file.close()
|
||||
file2 = open("application.py", "w", encoding="utf-8")
|
||||
file2.writelines(lines)
|
||||
file2.close()
|
||||
print("Wrote application.py with the new version info.")
|
||||
|
||||
print("Updating next version on installer setup...")
|
||||
file = open("installer.nsi", "r", encoding="utf-8")
|
||||
contents = file.read()
|
||||
contents = contents.replace("0.7", commit_info["created_at"][:10].replace("-", "."))
|
||||
file.close()
|
||||
file2 = open("installer.nsi", "w", encoding="utf-8")
|
||||
file2.write(contents)
|
||||
file2.close()
|
||||
print("done")
|
Loading…
Reference in New Issue
Block a user