socializer/.gitlab-ci.yml

117 lines
3.7 KiB
YAML
Raw Normal View History

# Jobs to build the two channels in Socializer.
2020-05-07 17:12:58 -05:00
# Currently using python 3.7.7
2019-01-01 20:56:12 -06:00
variables:
2020-02-23 16:20:34 -06:00
PYTHON3_32: "C:\\python37-32\\python.exe"
PYTHON3_64: "C:\\python37-64\\python.exe"
2020-05-07 23:44:29 -05:00
NSIS: "C:\\nsis\\makensis.exe"
2019-01-01 20:56:12 -06:00
2019-12-10 09:56:40 -06:00
.configure_environment: &configure_environment
tags:
- windows10
before_script:
2020-02-23 23:26:01 -06: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 09:56:40 -06:00
2019-11-26 09:26:27 -06: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 10:29:15 -05:00
documentation:
type: deploy
2020-02-28 17:26:05 -06:00
tags:
- windows10
2019-05-07 10:29:15 -05:00
script:
### Dependencies.
2020-05-07 17:12:58 -05:00
- '&$env:PYTHON3_32 -m pip install --upgrade babel markdown'
2020-02-28 17:26:05 -06:00
# generate all html documents first.
2019-05-07 10:29:15 -05:00
- copy changelog.md doc\changelog.md
- cd doc
2020-02-23 23:26:01 -06:00
- '&$env:PYTHON3_32 documentation_importer.py'
2019-05-07 10:29:15 -05:00
- cd ..\src
2020-02-23 23:26:01 -06:00
- '&$env:PYTHON3_32 ..\doc\generator.py'
2019-05-07 10:37:31 -05:00
- 'move documentation ..\'
2020-02-28 17:26:05 -06:00
# Update interface and documentation translation catalogs.
2020-02-28 15:41:52 -06: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-28 17:26:05 -06:00
- cd ..\doc
- '&$env:PYTHON3_32 translate.py'
- cd ..\src
2020-02-28 15:41:52 -06:00
- 'move locales ..\'
2019-05-07 10:29:15 -05:00
only:
- master
artifacts:
paths:
- documentation
2020-02-28 15:41:52 -06:00
- locales
2019-05-07 10:29:15 -05:00
name: socializer_documentation
expire_in: 30 days
2019-05-07 10:29:15 -05:00
2020-09-29 12:16:37 -05:00
update_catalogs:
type: deploy
tags:
- windows10
script:
2020-09-29 12:16:37 -05: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'
- cd ..\doc
- '&$env:PYTHON3_32 translate.py'
- cd ..
2020-09-29 12:28:56 -05:00
- 'git config user.name "Windows runner"'
- 'git config user.email "manuel@manuelcortez.net"'
2020-09-29 13:30:34 -05:00
- 'git add scripts'
2020-09-29 13:20:04 -05:00
- 'git remote set-url --push origin git@code.manuelcortez.net:$env:CI_PROJECT_PATH'
2020-09-29 13:35:38 -05:00
- 'git commit -m "Updated locales [skip ci]"'
2020-09-29 13:20:04 -05:00
- 'git push origin HEAD:$env:CI_COMMIT_REF_NAME'
only:
- master
2019-11-26 09:30:56 -06:00
alpha32:
2019-12-10 09:56:40 -06:00
<<: *configure_environment
2019-11-19 17:41:29 -06:00
type: deploy
script:
- copy changelog.md doc\changelog.md
- cd doc
2020-02-23 23:26:01 -06:00
- '&$env:PYTHON3_32 documentation_importer.py'
2019-11-19 17:41:29 -06:00
- cd ..\src
2020-02-23 23:26:01 -06: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-19 17:41:29 -06:00
- cd ..
- move src\socializer* .
2019-12-10 10:49:26 -06:00
- cd scripts
2020-02-23 23:26:01 -06:00
- '&$env:PYTHON3_32 prepare_zipversion.py'
2019-11-19 17:41:29 -06:00
- cd ..
2019-12-12 10:32:11 -06:00
- move src\socializer.zip socializer_x86_alpha.zip
2020-02-23 23:26:01 -06:00
- '&$env:PYTHON3_32 scripts/generate_update_file.py'
- '&$env:PYTHON3_32 scripts/upload.py'
2019-12-12 10:32:11 -06:00
- move socializer_x86_alpha.zip socializer_x86.zip
2019-11-19 17:41:29 -06:00
only:
2020-06-29 10:12:14 -05:00
- master
2019-11-19 17:41:29 -06:00
2019-11-26 09:26:27 -06:00
# Generates a new stable version of the application every tag.
stable:
2019-12-10 09:56:40 -06:00
<<: *configure_environment
2018-12-16 07:23:45 -06:00
type: deploy
script:
- copy changelog.md doc\changelog.md
2018-12-18 17:42:56 -06:00
- cd doc
2020-02-23 23:26:01 -06:00
- '&$env:PYTHON3_32 documentation_importer.py'
2018-12-18 17:42:56 -06:00
- cd ..\src
2020-02-23 23:26:01 -06: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-16 17:30:50 -06:00
- cd ..
2019-01-17 16:34:44 -06:00
- move src\socializer* .
2018-12-18 03:53:38 -06:00
- cd scripts
2020-06-05 10:37:27 -05:00
- '&$env:PYTHON3_32 prepare_zipversion.py'
2018-12-18 03:53:38 -06:00
- cd ..
2020-06-05 10:37:27 -05:00
- move src\socializer.zip socializer_x86.zip
2020-02-23 23:26:01 -06:00
- '&$env:PYTHON3_32 scripts/upload.py'
only:
2019-11-25 10:59:03 -06:00
- tags