Skip to content

Instantly share code, notes, and snippets.

@diegobz
Created February 11, 2015 06:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diegobz/9abf315357c67b5df614 to your computer and use it in GitHub Desktop.
Save diegobz/9abf315357c67b5df614 to your computer and use it in GitHub Desktop.
CircleCI Integration with Transifex
deployment:
txpush:
branch: devel
commands:
- ./txpush.sh
#!/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