socializer/.gitlab-ci.yml

120 lines
3.9 KiB
YAML
Raw Normal View History

# Jobs to build the two channels in Socializer.
2020-05-08 00:12:58 +02:00
# Currently using python 3.7.7
2019-01-02 03:56:12 +01:00
variables:
2020-02-23 23:20:34 +01:00
PYTHON3_32: "C:\\python37-32\\python.exe"
PYTHON3_64: "C:\\python37-64\\python.exe"
2020-05-08 06:44:29 +02:00
NSIS: "C:\\nsis\\makensis.exe"
2019-01-02 03:56:12 +01:00
2019-12-10 16:56:40 +01:00
.configure_environment: &configure_environment
tags:
- windows10
before_script:
2020-02-24 06:26:01 +01:00
- '&$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'
2019-12-10 16:56:40 +01:00
2019-11-26 16:26:27 +01:00
# Create documentation in all available languages so we'll have it at http://socializer.su/documentation
# this job is triggered on every commit to master, so we always will display the latest available version of the documentation in the website.
2019-05-07 17:29:15 +02:00
documentation:
type: deploy
2020-02-29 00:26:05 +01:00
tags:
- windows10
2019-05-07 17:29:15 +02:00
script:
### Dependencies.
2020-05-08 00:12:58 +02:00
- '&$env:PYTHON3_32 -m pip install --upgrade babel markdown'
2020-02-29 00:26:05 +01:00
# generate all html documents first.
2019-05-07 17:29:15 +02:00
- copy changelog.md doc\changelog.md
- cd doc
2020-02-24 06:26:01 +01:00
- '&$env:PYTHON3_32 documentation_importer.py'
2019-05-07 17:29:15 +02:00
- cd ..\src
2020-02-24 06:26:01 +01:00
- '&$env:PYTHON3_32 ..\doc\generator.py'
2019-05-07 17:37:31 +02:00
- 'move documentation ..\'
2020-02-29 00:26:05 +01:00
# Update interface and documentation translation catalogs.
2020-02-28 22:41:52 +01:00
- '&$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'
2020-02-29 00:26:05 +01:00
- cd ..\doc
- '&$env:PYTHON3_32 translate.py'
- cd ..\src
2020-02-28 22:41:52 +01:00
- 'move locales ..\'
2019-05-07 17:29:15 +02:00
only:
- master
artifacts:
paths:
- documentation
2020-02-28 22:41:52 +01:00
- locales
2019-05-07 17:29:15 +02:00
name: socializer_documentation
expire_in: 30 days
2019-05-07 17:29:15 +02:00
### Updates all translation templates for weblate
update_translation_templates:
type: deploy
tags:
- windows10
script:
2020-09-29 19:16:37 +02:00
- '&$env:PYTHON3_32 -m pip install --upgrade babel'
- copy changelog.md doc\changelog.md
- cd doc
- '&$env:PYTHON3_32 documentation_importer.py'
- cd ..\src
- '&$env:PYTHON3_32 setup.py extract_messages -F babel.cfg --input-dirs . --output-file ..\scripts\socializer.pot'
- '&$env:PYTHON3_32 setup.py update_catalog --no-fuzzy-matching --domain socializer --output-dir locales --input-file ..\scripts\socializer.pot'
- cd ..\doc
- '&$env:PYTHON3_32 translate.py'
- cd ..
2020-09-29 19:28:56 +02:00
- 'git config user.name "Windows runner"'
- 'git config user.email "manuel@manuelcortez.net"'
2020-09-29 20:30:34 +02:00
- 'git add scripts'
- 'git add src\locales'
2020-09-29 20:20:04 +02:00
- 'git remote set-url --push origin git@code.manuelcortez.net:$env:CI_PROJECT_PATH'
2020-09-29 20:35:38 +02:00
- 'git commit -m "Updated locales [skip ci]"'
2020-09-29 20:20:04 +02:00
- 'git push origin HEAD:$env:CI_COMMIT_REF_NAME'
only:
- master
2019-11-26 16:30:56 +01:00
alpha32:
2019-12-10 16:56:40 +01:00
<<: *configure_environment
2019-11-20 00:41:29 +01:00
type: deploy
script:
- copy changelog.md doc\changelog.md
- cd doc
2020-02-24 06:26:01 +01:00
- '&$env:PYTHON3_32 documentation_importer.py'
2019-11-20 00:41:29 +01:00
- cd ..\src
2020-02-24 06:26:01 +01:00
- '&$env:PYTHON3_32 ..\doc\generator.py'
- '&$env:PYTHON3_32 write_version_data.py'
- '&$env:PYTHON3_32 setup.py build'
- '&$env:NSIS installer_alpha.nsi'
2019-11-20 00:41:29 +01:00
- cd ..
- move src\socializer* .
2019-12-10 17:49:26 +01:00
- cd scripts
2020-02-24 06:26:01 +01:00
- '&$env:PYTHON3_32 prepare_zipversion.py'
2019-11-20 00:41:29 +01:00
- cd ..
2019-12-12 17:32:11 +01:00
- move src\socializer.zip socializer_x86_alpha.zip
2020-02-24 06:26:01 +01:00
- '&$env:PYTHON3_32 scripts/generate_update_file.py'
- '&$env:PYTHON3_32 scripts/upload.py'
2019-12-12 17:32:11 +01:00
- move socializer_x86_alpha.zip socializer_x86.zip
2019-11-20 00:41:29 +01:00
only:
2020-06-29 17:12:14 +02:00
- master
2019-11-20 00:41:29 +01:00
2019-11-26 16:26:27 +01:00
# Generates a new stable version of the application every tag.
stable:
2019-12-10 16:56:40 +01:00
<<: *configure_environment
2018-12-16 14:23:45 +01:00
type: deploy
script:
- copy changelog.md doc\changelog.md
2018-12-19 00:42:56 +01:00
- cd doc
2020-02-24 06:26:01 +01:00
- '&$env:PYTHON3_32 documentation_importer.py'
2018-12-19 00:42:56 +01:00
- cd ..\src
2020-02-24 06:26:01 +01:00
- '&$env:PYTHON3_32 ..\doc\generator.py'
- '&$env:PYTHON3_32 write_version_data.py'
- '&$env:PYTHON3_32 setup.py build'
- '&$env:NSIS installer.nsi'
2018-12-17 00:30:50 +01:00
- cd ..
2019-01-17 23:34:44 +01:00
- move src\socializer* .
2018-12-18 10:53:38 +01:00
- cd scripts
2020-06-05 17:37:27 +02:00
- '&$env:PYTHON3_32 prepare_zipversion.py'
2018-12-18 10:53:38 +01:00
- cd ..
2020-06-05 17:37:27 +02:00
- move src\socializer.zip socializer_x86.zip
2020-02-24 06:26:01 +01:00
- '&$env:PYTHON3_32 scripts/upload.py'
only:
2019-11-25 17:59:03 +01:00
- tags