/transifex.sh
https://github.com/merwok/django-oscar · Shell · 22 lines · 13 code · 1 blank · 8 comment · 3 complexity · c9c95e0bae4b44bb3d1fec417da9436c MD5 · raw file
- #!/usr/bin/env bash
- #
- # Push source and translation files to Transifex.
- #
- # This script is called after every successful build on Travis CI.
- # It relies on $TRANSIFEX_PASSWORD being set in .travis.yml
- # Only run once, and only on master
- echo $TRAVIS_JOB_NUMBER | grep "\.1$"
- if [ $? -eq 0 ] && [ $TRAVIS_BRANCH == master ]
- then
- echo "Submitting translation files to Transifex"
- make messages
- pip install "transifex-client==0.10"
- # Write .transifexrc file
- echo "[https://www.transifex.com]
- hostname = https://www.transifex.com
- password = $TRANSIFEX_PASSWORD
- token =
- username = oscar_bot" > ~/.transifexrc
- tx push --source --translations --no-interactive --skip
- fi