diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56a3e2f..0fafd33 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ variables: PYTHON3_64: "C:\\python37-64\\python.exe" NSIS: "C:\\nsis\\makensis.exe" +# This configures the environment for both channels .configure_environment: &configure_environment tags: - windows10 @@ -22,31 +23,24 @@ documentation: - windows10 script: ### Dependencies. - - '&$env:PYTHON3_32 -m pip install --upgrade babel markdown' - # generate all html documents first. + - '&$env:PYTHON3_32 -m pip install --upgrade markdown' + # generate all html documents. - copy changelog.md doc\changelog.md - cd doc - '&$env:PYTHON3_32 documentation_importer.py' - cd ..\src - '&$env:PYTHON3_32 ..\doc\generator.py' - 'move documentation ..\' - # Update interface and documentation translation catalogs. - - '&$env:PYTHON3_32 setup.py extract_messages -F babel.cfg --input-dirs . --output-file socializer.pot' - - '&$env:PYTHON3_32 setup.py update_catalog --no-fuzzy-matching --domain socializer --output-dir locales --input-file socializer.pot' - - cd ..\doc - - '&$env:PYTHON3_32 translate.py' - - cd ..\src - - 'move locales ..\' only: - master artifacts: paths: - documentation - - locales name: socializer_documentation - expire_in: 30 days + expire_in: 1 day ### Updates all translation templates for weblate +# this is also executed on every commit to master. update_translation_templates: type: deploy tags: @@ -62,6 +56,7 @@ update_translation_templates: - cd ..\doc - '&$env:PYTHON3_32 translate.py' - cd .. + # After generation, it's time to push all translation updates. - 'git config user.name "Windows runner"' - 'git config user.email "manuel@manuelcortez.net"' - 'git add scripts' @@ -76,23 +71,27 @@ alpha32: <<: *configure_environment type: deploy script: + # Create html documentation firstly. - copy changelog.md doc\changelog.md - cd doc - '&$env:PYTHON3_32 documentation_importer.py' - cd ..\src - '&$env:PYTHON3_32 ..\doc\generator.py' + # Writes version info useful for alphas. - '&$env:PYTHON3_32 write_version_data.py' + # build it all. - '&$env:PYTHON3_32 setup.py build' + # Once built, makes the installer for for alpha. - '&$env:NSIS installer_alpha.nsi' - cd .. - move src\socializer* . - cd scripts + # Zips the folder in order to create the portable socializer version. - '&$env:PYTHON3_32 prepare_zipversion.py' - cd .. - move src\socializer.zip socializer_x86_alpha.zip - '&$env:PYTHON3_32 scripts/generate_update_file.py' - '&$env:PYTHON3_32 scripts/upload.py' - - move socializer_x86_alpha.zip socializer_x86.zip only: - master