diff --git a/.gitignore b/.gitignore index d12c8ee13..ff6f04385 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,7 @@ android/package android/*.apk android/*.keystore +mobile/*.keystore mobile/assets/www mobile/bin mobile/gen diff --git a/mobile/AndroidManifest.xml b/mobile/AndroidManifest.xml index 7d2dde765..792e0d08a 100644 --- a/mobile/AndroidManifest.xml +++ b/mobile/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/mobile/build.sh b/mobile/build.sh index 8c828d6f1..50ece436a 100644 --- a/mobile/build.sh +++ b/mobile/build.sh @@ -20,12 +20,12 @@ checkOK() { BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" APPDIR="$BUILDDIR/assets/www" VERSION=`cut -d '"' -f2 $BUILDDIR/../version.js` -DEBUG="" +RELEASE=false RUN=false -if [[ $1 = "-d" ]] +if [[ $1 = "--release" ]] then - DEBUG="--enable-remote-debugging" + RELEASE=true fi if [[ $1 = "-r" ]] @@ -33,17 +33,6 @@ then RUN=true fi - -if [[ $# -eq 1 && ! $1 = "-d" && ! $1 = "-r" ]] -then - if [ ! -f $BUILDDIR/copay.keystore ] - then - echo "${OpenColor}${Red}* Can't build production app without a keystore${CloseColor}" - exit 1 - fi - PRODUCTION="--keystore-path=$BUILDDIR/copay.keystore --keystore-alias=copay_play --keystore-passcode=$1" -fi - # Move to the build directory cd $BUILDDIR @@ -64,7 +53,6 @@ checkOK # Copy all app files echo "${OpenColor}${Green}* Copying all app files...${CloseColor}" -# sed "s/APP_VERSION/$VERSION/g" manifest.json > $APPDIR/manifest.json cd $BUILDDIR/.. cp -af {css,font,img,js,lib,sound,config.js,version.js,$BUILDDIR/cordova.js,$BUILDDIR/cordova_plugins.js,$BUILDDIR/plugins} $APPDIR checkOK @@ -77,6 +65,9 @@ cd $BUILDDIR if [[ $RUN == true ]] then ./cordova/run +elif [[ $RELEASE == true ]] +then + ./cordova/build --release else ./cordova/build fi diff --git a/mobile/project.properties b/mobile/project.properties index dd3f8a168..7e7e77373 100644 --- a/mobile/project.properties +++ b/mobile/project.properties @@ -13,3 +13,5 @@ android.library.reference.1=CordovaLib # Project target. target=android-19 +key.store=copay.keystore +key.alias=copay_play \ No newline at end of file