Created
October 20, 2015 17:12
-
-
Save dukex/5c95405078ac37c7e4eb to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
branch_name=$(git branch | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/") | |
echo "Removing old cordova directory" | |
rm -rf cordova | |
echo "Creating cordova app to ${branch_name}..." | |
echo "WARNING: say 'no' to the next prompts" | |
ember generate cordova-init "my.company.${branch_name}" --platform=android | |
cd cordova | |
if [[ -n "$JAVA_HOME" ]]; then | |
cordova platform rm android | |
cordova platform add android | |
fi | |
if [[ "$OSTYPE" == "msys" ]]; then | |
cordova platform rm windows | |
cordova platform rm wp8 | |
cordova platform add windows | |
cordova platform add wp8 | |
elif [[ "$OSTYPE" == "darwin"* ]]; then | |
cordova platform rm ios | |
cordova platform add ios | |
fi | |
cordova plugin rm org.apache.cordova.file | |
cordova plugin rm com.jamiestarke.webviewdebug | |
cordova plugin rm org.apache.cordova.device | |
cordova plugin rm com.phonegap.plugins.PushPlugin | |
cordova plugin rm com.mesmotronic.plugins.fullscreen | |
cordova plugin rm cordova-plugin-inappbrowser | |
cordova plugin add https://github.com/digitalpages/cordova-plugin-file.git | |
cordova plugin add org.apache.cordova.device | |
cordova plugin add https://github.com/jrstarke/webview-debug.git | |
cordova plugin add https://github.com/dukex/PushPlugin.git | |
cordova plugin add https://github.com/raulsouzalima/cordova-fullscreen-plugin.git | |
cordova plugin add https://github.com/apache/cordova-plugin-inappbrowser.git | |
git checkout . | |
echo "DONE!" | |
echo "run: ember cordova:build" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment