-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
30 lines (30 loc) · 1.2 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
env:
global:
- GIT_EMAIL: [email protected]
- GH_REF: [email protected]:geokrety/GeoKrety-mole-name.git
language: python
python:
- "2.7"
install: "pip install -r requirements.txt"
before_script:
- pip install Babel
script:
- git config user.name "travis-ci - Automatic Publish"
- git config user.email "${GIT_EMAIL}"
- openssl aes-256-cbc -K $encrypted_c5618515_key -iv $encrypted_c5618515_iv -in deploy-key.enc -out deploy-key -d
- chmod 600 deploy-key
- eval `ssh-agent -s`
- ssh-add deploy-key
- git remote add gh-token "${GH_REF}";
- git fetch gh-token
- git checkout master
- git pull
- git config --global push.default simple
- pybabel extract -o app/translations/messages.pot ./app/templates/
- for dirr in ./app/translations/* ; do msgfmt ${dirr}/LC_MESSAGES/messages.po -o ${dirr}/LC_MESSAGES/messages.mo ; echo ${dirr} compiled; done
- DIFF=$(git diff --numstat)
- echo "$DIFF"
- echo "PLEASE TRAVIS! PLEASE!"
- if [ "$DIFF" != "1 1 app/translations/messages.pot" ]; then git add app/; git commit -m " travis-ci auto-update of translations [ci skip]"; fi;
after_success:
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ]; then echo "Pushing to github"; git push gh-token; fi