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 # 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: variables:
PYTHON3_32: "C:\\python38\\python.exe" PYTHON3_32: "C:\\python38\\python.exe"
NSIS: "C:\\program files (x86)\\nsis\\makensis.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: stages:
- generate_docs - generate_docs
- build - build
@ -114,7 +119,6 @@ alpha32:
- artifacts - artifacts
expire_in: 1 day expire_in: 1 day
# Generates a new stable version of the application every tag. # Generates a new stable version of the application every tag.
stable: stable:
<<: *configure_environment <<: *configure_environment
@ -129,12 +133,16 @@ stable:
- '&$env:PYTHON3_32 setup.py build' - '&$env:PYTHON3_32 setup.py build'
- '&$env:NSIS installer.nsi' - '&$env:NSIS installer.nsi'
- cd .. - cd ..
- move src\socializer* . - mkdir artifacts
- move src\socializer* artifacts\
- cd scripts - cd scripts
- '&$env:PYTHON3_32 prepare_zipversion.py' - '&$env:PYTHON3_32 prepare_zipversion.py'
- cd .. - cd ..
- move src\socializer.zip socializer_x86.zip - move src\socializer.zip artifacts\socializer_x86.zip
- '&$env:PYTHON3_32 scripts/upload.py' artifacts:
paths:
- artifacts
expire_in: 1 day
only: only:
- tags - tags

View File

@ -14,11 +14,11 @@ print("Version detected: %s" % (version_type,))
# Read update description and URL'S # Read update description and URL'S
if version_type == "alpha": if version_type == "alpha":
description = os.environ.get("CI_COMMIT_MESSAGE") 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: else:
with open("update-description",'r') as f: with open("update-description",'r') as f:
description = f.read() 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 # build the main dict object
data = dict(current_version=version, description=description, downloads=urls) data = dict(current_version=version, description=description, downloads=urls)