2018-12-28 20:07:56 -06:00
|
|
|
variables:
|
2020-07-18 01:23:44 -05:00
|
|
|
PYTHON3_32: "C:\\python38-32\\python.exe"
|
|
|
|
PYTHON3_64: "C:\\python38-64\\python.exe"
|
2018-12-29 11:36:57 -06:00
|
|
|
NSIS: "C:\\nsis\\makensis.exe"
|
2018-12-29 13:38:25 -06:00
|
|
|
|
2018-12-29 15:04:24 -06:00
|
|
|
### Stage list
|
|
|
|
# Build: This will be the main stage generating stuff in the dist folder. Jobs present in this stage will run py2exe or pyinstaller files accordingly.
|
|
|
|
# pack: Jobs in this stage will take the dist folder and zip it or generate an exe file.
|
2018-12-29 09:09:25 -06:00
|
|
|
stages:
|
2018-12-29 20:18:37 -06:00
|
|
|
- test
|
2018-12-29 13:49:44 -06:00
|
|
|
- build
|
2018-12-29 13:38:25 -06:00
|
|
|
- pack
|
2018-12-29 09:20:22 -06:00
|
|
|
|
2020-07-07 17:33:09 -05:00
|
|
|
.configure_environment: &configure_environment
|
2018-12-29 20:18:37 -06:00
|
|
|
tags:
|
|
|
|
- windows10
|
|
|
|
before_script:
|
2020-07-19 11:38:07 -05:00
|
|
|
- '&$env:PYTHON3_32 -V'
|
|
|
|
- '&$env:PYTHON3_32 -m venv env'
|
2020-07-19 10:31:34 -05:00
|
|
|
- 'env\scripts\activate'
|
2020-07-12 20:52:01 -05:00
|
|
|
- 'python -m pip install --upgrade pip'
|
2020-09-30 17:56:16 -05:00
|
|
|
- 'python -m pip install --upgrade -r requirements.txt'
|
2020-07-07 17:33:09 -05:00
|
|
|
|
2020-09-30 17:48:24 -05:00
|
|
|
### Updates all translation templates for weblate
|
|
|
|
update_translation_templates:
|
|
|
|
<<: *configure_environment
|
|
|
|
stage: build
|
|
|
|
tags:
|
|
|
|
- windows10
|
|
|
|
script:
|
|
|
|
- 'python -m pip install --upgrade babel'
|
|
|
|
# - copy changelog.md doc\changelog.md
|
|
|
|
# - cd doc
|
|
|
|
# - '&$env:PYTHON3_32 documentation_importer.py'
|
|
|
|
- cd src
|
2020-10-01 09:09:14 -05:00
|
|
|
- 'python setup.py extract_messages -o ..\scripts\musicdl.pot --msgid-bugs-address "manuel@manuelcortez.net" --copyright-holder "Manuel Cortez" --input-dirs .'
|
2020-10-01 10:03:41 -05:00
|
|
|
- 'python setup.py update_catalog --input-file ..\scripts\musicdl.pot --domain musicdl --output-dir locales --ignore-obsolete true'
|
2020-09-30 17:48:24 -05:00
|
|
|
# - cd ..\doc
|
|
|
|
# - '&$env:PYTHON3_32 translate.py'
|
|
|
|
- cd ..
|
|
|
|
- 'git config user.name "Windows runner"'
|
|
|
|
- 'git config user.email "manuel@manuelcortez.net"'
|
|
|
|
- 'git add scripts'
|
2020-10-01 10:03:41 -05:00
|
|
|
- 'git add src\locales'
|
2020-09-30 17:48:24 -05:00
|
|
|
- 'git remote set-url --push origin git@code.manuelcortez.net:$env:CI_PROJECT_PATH'
|
|
|
|
- 'git commit -m "Updated locales [skip ci]"'
|
|
|
|
- 'git push origin HEAD:$env:CI_COMMIT_REF_NAME'
|
|
|
|
only:
|
2020-10-01 09:09:14 -05:00
|
|
|
- master
|
2020-09-30 17:48:24 -05:00
|
|
|
|
2020-10-01 09:21:11 -05:00
|
|
|
test:
|
|
|
|
<<: *configure_environment
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- windows10
|
|
|
|
script:
|
|
|
|
- cd src
|
|
|
|
- 'python -m pip install --upgrade coverage'
|
|
|
|
- 'python -m coverage run run_tests.py'
|
|
|
|
- 'python -m coverage report --omit="test*"'
|
|
|
|
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- schedules
|
|
|
|
|
2020-07-07 17:33:09 -05:00
|
|
|
public:
|
|
|
|
<<: *configure_environment
|
2018-12-29 11:31:13 -06:00
|
|
|
stage: build
|
2018-12-29 09:09:25 -06:00
|
|
|
script:
|
2018-12-28 20:07:56 -06:00
|
|
|
- cd src
|
2020-07-18 01:52:41 -05:00
|
|
|
- 'python write_version_data.py'
|
2020-07-12 20:52:01 -05:00
|
|
|
- 'python setup.py build'
|
2020-07-07 17:33:09 -05:00
|
|
|
- '&$env:NSIS installer.nsi'
|
|
|
|
- cd ..
|
|
|
|
- move src\music_dl* .
|
2018-12-29 13:38:25 -06:00
|
|
|
- cd scripts
|
2020-07-12 20:52:01 -05:00
|
|
|
- 'python prepare_zipversion.py'
|
2018-12-29 13:38:25 -06:00
|
|
|
- cd ..
|
|
|
|
- move src\music_dl.zip music_dl.zip
|
2020-07-12 21:57:53 -05:00
|
|
|
- 'python scripts/generate_update_file.py'
|
|
|
|
- 'python scripts/upload.py'
|
2018-12-29 11:31:13 -06:00
|
|
|
only:
|
2020-07-07 17:33:09 -05:00
|
|
|
- master
|