[i18n] Add check-trad job + pull locales when deploying to beta

This commit is contained in:
Luc Didry 2018-04-05 10:46:55 +02:00
parent 9ce586347b
commit 0151361cc9
1 changed files with 14 additions and 0 deletions

View File

@ -17,6 +17,18 @@ test:
paths:
- vendor/
check-trad:
stage: test
allow_failure: true
script:
- if [ -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then echo "*** Unable to check if translations need to be pulled, exiting ***"; exit 1; fi
- export ORIG=$(git diff-files --shortstat)
- if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then mkdir -p ${HOME}/.config; echo -e "${ZANATA_CONFIG_FRAMABOT}" > ${HOME}/.config/zanata.ini; fi
- if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then make push-locales; fi
- git status > /dev/null 2>&1
- export CHANGES=$(git diff-files --shortstat)
- if [[ $CHANGES != $ORIG ]]; then echo "*** There is changes in locales ***"; echo "*** You need to do `make pull-locales` in your repo ***"; exit 1; fi
# Create artifacts on master
pages:
stage: deploy
@ -45,6 +57,8 @@ beta:
- git checkout develop
- composer install -o --no-interaction --no-progress --prefer-dist --no-dev
- composer dump-autoload --optimize --no-dev --classmap-authoritative
- if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then mkdir -p ${HOME}/.config; echo -e "${ZANATA_CONFIG_FRAMABOT}" > ${HOME}/.config/zanata.ini; fi
- if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then make pull-locales; fi
- mkdir tpl_c
- mkdir .public
- cp -r * .public