Skip to content

Instantly share code, notes, and snippets.

@paolorotolo
Created January 26, 2016 20:40
Show Gist options
  • Save paolorotolo/404110603ba22ff0728b to your computer and use it in GitHub Desktop.
Save paolorotolo/404110603ba22ff0728b to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo -e "Starting translation import\n"
#go to home and setup git
cd $HOME
git config --global user.email "[email protected]"
git config --global user.name "Glucat"
#clone gh-pages branch
git clone --branch=develop https://[email protected]/Glucosio/glucosio-android.git develop > /dev/null
cd develop/app/src/main/res/
wget https://crowdin.com/downloads/crowdin-cli.jar
java -jar crowdin-cli.jar download
rm crowdin-cli.jar
cp -r wear/* $HOME/develop/wear/src/main/res/
cd $HOME/develop
#add, commit and push files
git add -f .
git remote rm origin
git remote add origin https://glucat:[email protected]/Glucosio/glucosio-android.git
git add -f .
git commit -m "Automatic translation import (build $TRAVIS_BUILD_NUMBER)."
git push -f origin develop > /dev/null
echo -e "Done magic with coverage\n"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment