summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml36
1 files changed, 30 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index a3f6360b..f7a7a811 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,20 +14,26 @@ matrix:
- python: 2.7
env: LINT=true
sudo: false
+ if: type != cron
- python: 2.7
sudo: required
env: BUILD=linux
- if: tag =~ ^v[0-9.]+$ OR branch != master
+ if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master)
- python: 2.7
sudo: required
env: BUILD=windows
- if: tag =~ ^v[0-9.]+$ OR branch != master
+ if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master)
- language: generic
os: osx
sudo: required
env: BUILD=osx
- if: tag =~ ^v[0-9.]+$ OR branch != master
+ if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master)
+
+ - language: java
+ sudo: false
+ env: CROWDIN=true
+ if: type = cron
branches:
except:
- /^dev-build-/
@@ -38,8 +44,9 @@ install:
if [ -n "$BUILD" ]; then
# Need this for inkex.py and friends
wget -q https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2
- tar jxf inkscape-0.92.3.tar.bz2
+ tar -jxf inkscape-0.92.3.tar.bz2
rm inkscape-0.92.3.tar.bz2
+ mv inkscape-0.92.3 inkscape
fi
if [ "$BUILD" = "linux" ]; then
# For some bizarre reason, this build has been failing due to the
@@ -137,14 +144,31 @@ script:
travis_wait 60 ssh -o StrictHostKeyChecking=no -i .ssh/id_rsa -N -R 9999:localhost:9999 debug@lex.gd
fi
if [ -n "$LINT" ]; then
- flake8 . --count --exit-zero --select=E901,E999,F821,F822,F823 --show-source --statistics --exclude=embroidermodder
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=embroidermodder
+ make style
elif [ "$BUILD" = "linux" -o "$BUILD" = "osx" ]; then
make dist
elif [ "$BUILD" = "windows" ]; then
# work around some bug... pyinstaller? shapely? not sure.
cp $(winepath 'C:\Python\lib\site-packages\shapely\DLLs\geos_c.dll') $(winepath 'C:\Python\lib\site-packages\shapely\DLLs\geos.dll')
make dist
+ elif [ -n "$CROWDIN" ]; then
+ git config --global user.email "inkstitch-crowdin@lex.gd"
+ git config --global user.name "Ink/Stitch Crowdin integration"
+ git checkout master
+
+ wget https://downloads.crowdin.com/cli/v2/crowdin-cli.zip
+ unzip -j crowdin-cli.zip
+ java -jar crowdin-cli.jar upload -b master
+ java -jar crowdin-cli.jar pull -b master
+
+ # Try to only commit if translations changed. Crowdin will update all
+ # files when a new translation string is added but we don't need to
+ # commit those until folks actually translate the new strings.
+ if git diff translations | grep -qE '^[-+]msgstr ".+"$'; then
+ git add translations
+ git commit -m "new translations from Crowdin"
+ git push https://${TRAVIS_REPO_SLUG%/*}:${GITHUB_API_KEY}@github.com/${TRAVIS_REPO_SLUG}.git master
+ fi
else
true
fi