Travis: push translation source change to transifex

This commit is contained in:
wwylele 2017-12-15 10:06:52 +02:00
parent 500a7f07c2
commit 9fba503c9e
4 changed files with 31 additions and 0 deletions

View File

@ -21,6 +21,22 @@ matrix:
install: "./.travis/linux/deps.sh"
script: "./.travis/linux/build.sh"
after_success: "./.travis/linux/upload.sh"
- if: branch = master AND type = push
os: linux
env: NAME="transifex push"
sudo: required
dist: trusty
addons:
apt:
packages:
- libsdl2-dev
- qtbase5-dev
- libqt5opengl5-dev
- qttools5-dev
- qttools5-dev-tools
install: "./.travis/transifex/deps.sh"
script: "./.travis/transifex/build.sh"
after_success: "./.travis/transifex/upload.sh"
- os: osx
env: NAME="macos build"
sudo: false

6
.travis/transifex/build.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash -ex
mkdir build && cd build
cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release
make translation

4
.travis/transifex/deps.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash -ex
sudo pip install transifex-client
echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = api\npassword = '"$TRANSIFEX_API_TOKEN"$'\n' > ~/.transifexrc

5
.travis/transifex/upload.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash -ex
cd dist/languages
tx push -s