Let's give containers a go

This commit is contained in:
Manuel Cortez 2021-12-23 17:15:06 -06:00
parent 6a809d52f0
commit ad9793cc47
No known key found for this signature in database
GPG Key ID: 9E0735CA15EFE790

View File

@ -11,70 +11,38 @@ steps:
commands: commands:
- 'type C:\ProgramData\Amazon\EC2-Windows\Launch\Log\UserdataExecution.log' - 'type C:\ProgramData\Amazon\EC2-Windows\Launch\Log\UserdataExecution.log'
- name: Upgrade chocolatey
commands:
- 'choco upgrade chocolatey -y'
- name: Install Python
environment:
PYTHON3_32: C:\python37\python.exe
commands:
- 'choco install python --version 3.7.9 -y -ForceX86'
- '&$env:PYTHON3_32 -V'
- '&$env:PYTHON3_32 -m pip install --upgrade pip'
- '&$env:PYTHON3_32 -m pip install --upgrade -r requirements.txt'
- '&$env:PYTHON3_32 -m pip uninstall enum34 -y'
- '&$env:PYTHON3_32 -m pip install --upgrade markdown babel nuitka -y'
- name: Generate doc - name: Generate doc
environment: image: python
PYTHON3_32: C:\python37\python.exe
commands: commands:
- pip install --upgrade pip
- pip install --upgrade markdown babel
- cp changelog.md doc/changelog.md - cp changelog.md doc/changelog.md
- cd doc - cd doc
- python documentation_importer.py - python documentation_importer.py
- cd ..\src - cd ..\src
- '&$env:PYTHON3_32 ..\doc/generator.py' - 'python ..\doc/generator.py'
- name: Build app - name: Build app
environment: image: python
PYTHON3_32: C:\python37\python.exe
commands: commands:
- 'python -V'
- 'python -m pip install --upgrade pip'
- 'python -m pip install --upgrade -r requirements.txt'
- 'python -m pip uninstall enum34 -y'
- cd src - cd src
# Write version info useful for updates. # Write version info useful for updates.
- '&$env:PYTHON3_32 write_version_data.py' - 'python write_version_data.py'
# build it all. # build it all.
- '&$env:PYTHON3_32 -m nuitka --mingw64 --standalone --enable-plugin=anti-bloat --noinclude-pytest-mode=nofollow --noinclude-setuptools-mode=nofollow --nofollow-import-to=numpy --nofollow-import-to=babel --nofollow-import-to=cx_freeze --nofollow-import-to=pil --include-data-file=../windows-dependencies/x86/oggenc2.exe=oggenc2.exe --include-data-file=../windows-dependencies/x86/bootstrap.exe=bootstrap.exe --include-data-file=app-configuration.defaults=app-configuration.defaults --include-data-dir=locales=locales --include-data-dir=documentation=documentation --include-data-dir=sounds=sounds --include-data-file=session.defaults=session.defaults --windows-disable-console --windows-file-description="Accessible VK Client for Windows" --windows-product-version=2021.12.14.0 --windows-file-version=2021.12.14.0 --windows-product-name="Socializer" --windows-company-name="MCV Software" --python-flag=no_site --assume-yes-for-downloads --remove-output "socializer.py"' - 'python -m nuitka --mingw64 --standalone --enable-plugin=anti-bloat --noinclude-pytest-mode=nofollow --noinclude-setuptools-mode=nofollow --nofollow-import-to=numpy --nofollow-import-to=babel --nofollow-import-to=cx_freeze --nofollow-import-to=pil --include-data-file=../windows-dependencies/x86/oggenc2.exe=oggenc2.exe --include-data-file=../windows-dependencies/x86/bootstrap.exe=bootstrap.exe --include-data-file=app-configuration.defaults=app-configuration.defaults --include-data-dir=locales=locales --include-data-dir=documentation=documentation --include-data-dir=sounds=sounds --include-data-file=session.defaults=session.defaults --windows-disable-console --windows-file-description="Accessible VK Client for Windows" --windows-product-version=2021.12.14.0 --windows-file-version=2021.12.14.0 --windows-product-name="Socializer" --windows-company-name="MCV Software" --python-flag=no_site --assume-yes-for-downloads --remove-output "socializer.py"'
- '&$env:PYTHON3_32 ..\scripts\copy_missing_files.py' - 'python ..\scripts\copy_missing_files.py'
- cd .. - cd ..
- mkdir artifacts - mkdir artifacts
# Zips the folder in order to create the portable socializer version. # Zips the folder in order to create the portable socializer version.
- cd scripts - cd scripts
- '&$env:PYTHON3_32 prepare_zipversion.py' - 'python prepare_zipversion.py'
- cd .. - cd ..
- move src\socializer.zip artifacts\socializer_x86.zip - move src\socializer.zip artifacts\socializer_x86.zip
- mv src/socializer.dist artifacts/socializer - mv src/socializer.dist artifacts/socializer
- move src/installer.nsi artifacts - move src/installer.nsi artifacts
- '&$env:PYTHON3_32 scripts/generate_update_file.py' - 'python scripts/generate_update_file.py'
- move *.json artifacts - move *.json artifacts
- name: generate installer
environment:
NSIS: C:\program files (x86)\nsis\makensis.exe
commands:
- choco install nsis -y -ForceX86
- cd artifacts
- '&$env:NSIS installer.nsi'
- name: upload
environment:
FTP_SERVER: de.manuelcortez.net
FTP_USERNAME:
from_secret: username
FTP_PASSWORD:
from_secret: password
environment:
PYTHON3_32: C:\python37\python.exe
commands:
- cd artifacts
- '&$env:PYTHON3_32 ../scripts/upload.py'