BROKEN: display subconnectors as in 2.*
[andGMXsms.git] / bump.sh
blobcaaabb45f3d459d53e4965762da7d0f5c6199fbc
1 #! /bin/sh
3 if [ "$(basename $0)" == "bump-connector.sh" ] ; then
4 echo -n "bump connector: "
5 basename $PWD
6 n=$(fgrep app_name res/values/*.xml | cut -d\> -f2 | cut -d\< -f1 | tr ' ' '-' | tr -d ':')
7 else
8 echo "bump websms"
9 n=$(fgrep app_name res/values/*.xml | cut -d\> -f2 | cut -d\< -f1 | cut -d\ -f1 | tr -d \ )
12 v=${1}
13 vv=$(echo ${v}0000 | tr -d . | head -c4 | sed -e 's:^0::g')
15 if [ -n "$2" ] ; then
16 vn="$v $2"
17 else
18 vn=$v
21 #echo v $v
22 #echo vn $vn
23 #echo vv $vv
24 #echo n $n
26 sed -i -e "s/android:versionName=[^ >]*/android:versionName=\"${vn}\"/" AndroidManifest.xml
27 sed -i -e "s/android:versionCode=[^ >]*/android:versionCode=\"${vv}\"/" AndroidManifest.xml
28 sed -i -e "s/app_version\">[^<]*/app_version\">${vn}/" res/values/strings.xml
30 git diff
32 ant debug || exit -1
34 mv bin/*-debug.apk ~/public_html/h/flx/ 2> /dev/null
36 echo "enter for commit+tag"
37 read a
38 git commit -am "bump to v${vn}"
39 git tag -a "v${vn}" -m "${n}-${vn}"