Changes for building a release apk

This commit is contained in:
Yemel Jardi 2014-07-25 12:56:45 -03:00
parent d37fb96836
commit 0aba7df3ff
4 changed files with 10 additions and 16 deletions

1
.gitignore vendored
View File

@ -54,6 +54,7 @@ android/package
android/*.apk
android/*.keystore
mobile/*.keystore
mobile/assets/www
mobile/bin
mobile/gen

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="1.0" android:windowSoftInputMode="adjustPan" package="com.bipay.copay" xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:hardwareAccelerated="true" android:versionCode="3" android:versionName="0.4.1" android:windowSoftInputMode="adjustPan" package="com.bitpay.copay" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

View File

@ -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

View File

@ -13,3 +13,5 @@
android.library.reference.1=CordovaLib
# Project target.
target=android-19
key.store=copay.keystore
key.alias=copay_play