From 9481d2868f414dc116b549504daeff36bf9bdf02 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Mon, 27 Jul 2020 09:44:04 -0500 Subject: [PATCH] Updated scripts to be executed on CI environment --- scripts/generate_update_file.py | 10 +++++----- scripts/upload.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/generate_update_file.py b/scripts/generate_update_file.py index e1b2671..bc7b3a8 100644 --- a/scripts/generate_update_file.py +++ b/scripts/generate_update_file.py @@ -6,15 +6,15 @@ print("Generating update files for Socializer...")# Determine if we are going to # Stable file is when we build tags and alpha otherwise. version = os.environ.get("CI_COMMIT_TAG") or os.environ.get("CI_COMMIT_SHORT_SHA") if os.environ.get("CI_COMMIT_TAG") == None: - version_type = "alpha" + version_type = "latest" else: version_type = "stable" print("Version detected: %s" % (version_type,)) # Read update description and URL'S -if version_type == "alpha": +if version_type == "latest": description = os.environ.get("CI_COMMIT_MESSAGE") - urls = dict(Windows32="https://manuelcortez.net/static/files/music_dl/alpha/music_dl.zip", Windows64="https://manuelcortez.net/static/files/music_dl/alpha/music_dl.zip") + urls = dict(Windows32="https://manuelcortez.net/static/files/music_dl/latest/music_dl.zip", Windows64="https://manuelcortez.net/static/files/music_dl/latest/music_dl.zip") else: with open("update-description",'r') as f: description = f.read() @@ -23,8 +23,8 @@ else: # build the main dict object data = dict(current_version=version, description=description, downloads=urls) print("Generating file with the following arguments: %r" % (data,)) -if version_type == "alpha": - updatefile = "alpha.json" +if version_type == "latest": + updatefile = "latest.json" else: updatefile = "stable.json" f = open(updatefile, "w") diff --git a/scripts/upload.py b/scripts/upload.py index 07788f6..8ff9199 100644 --- a/scripts/upload.py +++ b/scripts/upload.py @@ -47,7 +47,7 @@ def callback(progress): ftp_server = os.environ.get("FTP_SERVER") or sys.argv[1] ftp_username = os.environ.get("FTP_USERNAME") or sys.argv[2] ftp_password = os.environ.get("FTP_PASSWORD") or sys.argv[3] -version = os.environ.get("CI_COMMIT_TAG") or "alpha" +version = os.environ.get("CI_COMMIT_TAG") or "latest" version = version.replace("v", "") print("Uploading files to the Socializer server...")