Created
February 11, 2015 06:23
-
-
Save diegobz/9abf315357c67b5df614 to your computer and use it in GitHub Desktop.
CircleCI Integration with Transifex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deployment: | |
txpush: | |
branch: devel | |
commands: | |
- ./txpush.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Push source file to Transifex. | |
# It relies on $TRANSIFEX_PASSWORD env var being set in CircleCI. | |
# Making sure it indeed only runs for the 'devel' branch | |
if [ "$CIRCLE_BRANCH" != "devel" ]; then | |
exit | |
fi | |
# Write .transifexrc file | |
cat > ~/.transifexrc <<EOF | |
[https://www.transifex.com] | |
hostname = https://www.transifex.com | |
password = ${TRANSIFEX_PASSWORD} | |
token = | |
username = transifex | |
EOF | |
cd transifex && python ../manage.py makemessages --no-obsolete -l en && cd .. && tx push -s -l en --no-interactive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment