#!/bin/sh
# Install crowdin-cli
curl -o ~/crowdin.deb https://artifacts.crowdin.com/repo/deb/crowdin.deb
sudo dpkg -i ~/crowdin.deb

# Configure git for pushing
git config --global user.email "webteam@coderdojo.com"
git config --global user.name "CoderDojo Foundation"

# Configure NPM
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc

# Crowdin
crowdin upload sources
for lang in it pt-PT de nl ro mt sl sk fr uk es-ES es-AR el pl et bg tr ja hi lt; do
	crowdin download -l $lang
done

# Bump version, push and publish
npm version patch
git push
npm publish

#!/bin/sh
# Install crowdin-cli and deps
gem install mime-types -v 2.6.2
gem install rest-client -v 1.8
gem install crowdin-cli

# Configure git for pushing
git config --global user.email "webteam@coderdojo.com"
git config --global user.name "CoderDojo Foundation"

# Configure NPM
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc

# Crowdin
crowdin-cli upload sources
for lang in it pt-PT de nl ro mt sl sk fr uk es-ES es-AR el pl et bg tr ja hi lt; do
	crowdin-cli download -l $lang
done

# Bump version, push and publish
npm version patch
git push
npm publish

--- 
+++ 
@@ -1,7 +1,8 @@
 #!/bin/sh
-# Install crowdin-cli
-curl -o ~/crowdin.deb https://artifacts.crowdin.com/repo/deb/crowdin.deb
-sudo dpkg -i ~/crowdin.deb
+# Install crowdin-cli and deps
+gem install mime-types -v 2.6.2
+gem install rest-client -v 1.8
+gem install crowdin-cli
 
 # Configure git for pushing
 git config --global user.email "webteam@coderdojo.com"
@@ -11,9 +12,9 @@
 echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
 
 # Crowdin
-crowdin upload sources
+crowdin-cli upload sources
 for lang in it pt-PT de nl ro mt sl sk fr uk es-ES es-AR el pl et bg tr ja hi lt; do
-	crowdin download -l $lang
+	crowdin-cli download -l $lang
 done
 
 # Bump version, push and publish
Switch to new Java-based Crowdin CLI tool
