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')
25 echo tag
"${n}-${vn/ /-}"
26 echo tagm
"$(echo ${n} | tr '-' ' ' | sed -e 's/Connector /Connector: /') v${vn}"
28 sed -i -e "s/android:versionName=\"[^\"]*/android:versionName=\"${vn}/" AndroidManifest.xml
29 sed -i -e "s/android:versionCode=\"[^\"]*/android:versionCode=\"${vv}/" AndroidManifest.xml
30 vfile
=$
(grep -l app_version res
/values
/*.xml
)
31 sed -i -e "s/app_version\">[^<]*/app_version\">${vn}/" "${vfile}"
37 mv bin
/*-debug.apk ~
/public_html
/h
/flx
/ 2> /dev
/null
39 echo "enter for commit+tag"
41 git commit
-am "bump to ${n} v${vn}"
42 git tag
-a "${n}-${vn/ /-}" -m "${n} v${vn}"