From 9fba503c9ebcdf405a89652f841bd65864bed59c Mon Sep 17 00:00:00 2001 From: wwylele Date: Fri, 15 Dec 2017 10:06:52 +0200 Subject: [PATCH] Travis: push translation source change to transifex --- .travis.yml | 16 ++++++++++++++++ .travis/transifex/build.sh | 6 ++++++ .travis/transifex/deps.sh | 4 ++++ .travis/transifex/upload.sh | 5 +++++ 4 files changed, 31 insertions(+) create mode 100755 .travis/transifex/build.sh create mode 100755 .travis/transifex/deps.sh create mode 100755 .travis/transifex/upload.sh diff --git a/.travis.yml b/.travis.yml index 9624d4483..111d89528 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/.travis/transifex/build.sh b/.travis/transifex/build.sh new file mode 100755 index 000000000..2e9822360 --- /dev/null +++ b/.travis/transifex/build.sh @@ -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 + diff --git a/.travis/transifex/deps.sh b/.travis/transifex/deps.sh new file mode 100755 index 000000000..3fa6b1109 --- /dev/null +++ b/.travis/transifex/deps.sh @@ -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 diff --git a/.travis/transifex/upload.sh b/.travis/transifex/upload.sh new file mode 100755 index 000000000..f51847850 --- /dev/null +++ b/.travis/transifex/upload.sh @@ -0,0 +1,5 @@ +#!/bin/bash -ex + +cd dist/languages +tx push -s +