Alpha versions are back

This commit is contained in:
Manuel Cortez 2021-01-18 15:47:19 -06:00
parent 11b4b76eae
commit 291334654c
2 changed files with 15 additions and 7 deletions

View File

@ -1,9 +1,14 @@
# This CI configuration file assumes we are going to use gitlab Shared runners at gitlab.com
# the next variables are customized to the filepaths used when installing python and nsis with chocolatey.
# due to gitlab possibilities, we use a mix of Windows and docker containers (the python image) to build the project.
# the next variables are customized to the filepaths used when installing python and nsis with chocolatey on the windows runners.
variables:
PYTHON3_32: "C:\\python38\\python.exe"
NSIS: "C:\\program files (x86)\\nsis\\makensis.exe"
# The project defines 3 stages:
# 1. Generate_docs: generates the documentation and update translation files. This uses the python docker image.
# 2. Build: Creates the executable file by using a windows runner.
# 3. Upload: Puts everything in an ftp directory. I had to use a docker container here because the Windows runner has all ports blocked.
stages:
- generate_docs
- build
@ -114,7 +119,6 @@ alpha32:
- artifacts
expire_in: 1 day
# Generates a new stable version of the application every tag.
stable:
<<: *configure_environment
@ -129,12 +133,16 @@ stable:
- '&$env:PYTHON3_32 setup.py build'
- '&$env:NSIS installer.nsi'
- cd ..
- move src\socializer* .
- mkdir artifacts
- move src\socializer* artifacts\
- cd scripts
- '&$env:PYTHON3_32 prepare_zipversion.py'
- cd ..
- move src\socializer.zip socializer_x86.zip
- '&$env:PYTHON3_32 scripts/upload.py'
- move src\socializer.zip artifacts\socializer_x86.zip
artifacts:
paths:
- artifacts
expire_in: 1 day
only:
- tags

View File

@ -14,11 +14,11 @@ print("Version detected: %s" % (version_type,))
# Read update description and URL'S
if version_type == "alpha":
description = os.environ.get("CI_COMMIT_MESSAGE")
urls = dict(Windows32="http://socializer.su/static/files/alpha/socializer_x86_alpha.zip", Windows64="http://socializer.su/static/files/alpha/socializer_x64_alpha.zip")
urls = dict(Windows32="https://files.manuelcortez.net/socializer/alpha/socializer_x86_alpha.zip", Windows64="https://files.manuelcortez.net/socializer/alpha/socializer_x64_alpha.zip")
else:
with open("update-description",'r') as f:
description = f.read()
urls=dict(Windows32="http://socializer.su/static/files/{v}/socializer_{v}_x86.zip".format(v=version[1:]), Windows64="http://socializer.su/static/files/{v}/socializer_{v}_x64.zip".format(v=version[1:]))
urls=dict(Windows32="https://files.manuelcortez.net/socializer/{v}/socializer_{v}_x86.zip".format(v=version[1:]), Windows64="https://files.manuelcortez.net/socializer/{v}/socializer_{v}_x64.zip".format(v=version[1:]))
# build the main dict object
data = dict(current_version=version, description=description, downloads=urls)