mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
add translation stage
This commit is contained in:
parent
3e9da894bf
commit
5967096c05
2 changed files with 25 additions and 0 deletions
|
@ -5,6 +5,7 @@ stages:
|
||||||
- tests
|
- tests
|
||||||
- lint
|
- lint
|
||||||
- doc
|
- doc
|
||||||
|
- translation
|
||||||
|
|
||||||
default:
|
default:
|
||||||
tags:
|
tags:
|
||||||
|
|
24
.gitlab/ci/translation.gitlab-ci.yml
Normal file
24
.gitlab/ci/translation.gitlab-ci.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
########################################
|
||||||
|
# TRANSLATION
|
||||||
|
########################################
|
||||||
|
|
||||||
|
remove-stale-translated-strings:
|
||||||
|
stage: translation
|
||||||
|
image: "before-install"
|
||||||
|
needs: []
|
||||||
|
before_script:
|
||||||
|
- apt-get update -y && apt-get install git hub -y
|
||||||
|
- git config --global user.email "yunohost@yunohost.org"
|
||||||
|
- git config --global user.name "$GITHUB_USER"
|
||||||
|
script:
|
||||||
|
- cd tests # Maybe move this script location to another folder?
|
||||||
|
# create a local branch that will overwrite distant one
|
||||||
|
- git checkout -b "ci-remove-stale-translated-strings-${CI_COMMIT_REF_NAME}" --no-track
|
||||||
|
- python remove_stale_translated_strings.py
|
||||||
|
- '[ $(git diff | wc -l) != 0 ] || exit 0' # stop if there is nothing to commit
|
||||||
|
- git commit -am "[CI] Remove stale translated strings" || true
|
||||||
|
- git push -f origin "ci-remove-stale-translated-strings-${CI_COMMIT_REF_NAME}":"ci-remove-stale-translated-strings-${CI_COMMIT_REF_NAME}"
|
||||||
|
- hub pull-request -m "[CI] Remove stale translated strings" -b Yunohost:dev -p || true # GITHUB_USER and GITHUB_TOKEN registered here https://gitlab.com/yunohost/yunohost/-/settings/ci_cd
|
||||||
|
only:
|
||||||
|
changes:
|
||||||
|
- locales/*
|
Loading…
Add table
Reference in a new issue