3 if [ "$(basename $0)" == "bump-connector.sh" ] ; then
4 echo -n "bump connector: "
6 n
=$
(fgrep app_name res
/values
/*.xml | cut
-d\
> -f2 | cut
-d\
< -f1 |
tr ' ' '-' |
tr -d ':')
9 n
=$
(fgrep app_name res
/values
/*.xml | cut
-d\
> -f2 | cut
-d\
< -f1 | cut
-d\
-f1 |
tr -d \
)
13 vv
=$
(echo ${v}0000 |
tr -d . |
head -c4 |
sed -e 's:^0::g')
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
34 mv bin
/*-debug.apk ~
/public_html
/h
/flx
/ 2> /dev
/null
36 echo "enter for commit+tag"
38 git commit
-am "bump to v${vn}"
39 git tag
-a "v${vn}" -m "${n}-${vn}"