Revision daa226b0
jenkins-build | ||
---|---|---|
1 |
#!/bin/bash |
|
2 |
|
|
3 |
set -e |
|
4 |
set -x |
|
5 |
|
|
6 |
if [ -z $ANDROID_HOME ]; then |
|
7 |
if [ -e ~/.android/bashrc ]; then |
|
8 |
. ~/.android/bashrc |
|
9 |
else |
|
10 |
echo "ANDROID_HOME must be set!" |
|
11 |
exit |
|
12 |
fi |
|
13 |
fi |
|
14 |
|
|
15 |
# reset version code/name to current date |
|
16 |
versionCodeDate=`date +%s` |
|
17 |
versionNameDate=`date +%Y-%m-%d_%H.%M.%S` |
|
18 |
|
|
19 |
sed -i \ |
|
20 |
-e "s,android:versionCode=\"[0-9][0-9]*\",android:versionCode=\"$versionCodeDate\"," \ |
|
21 |
-e "s,android:versionName=\"\([^\"][^\"]*\)\",android:versionName=\"\1.$versionNameDate\"," \ |
|
22 |
AndroidManifest.xml |
|
23 |
|
|
24 |
projectname=`sed -n 's,.*name="app_name">\(.*\)<.*,\1,p' res/values/strings.xml` |
|
25 |
|
|
26 |
# fetch target from project.properties |
|
27 |
eval `grep '^target=' project.properties` |
|
28 |
|
|
29 |
android update lib-project --path libs/appcompat --target $target |
|
30 |
android update project --name $projectname --path . --target $target |
Also available in: Unified diff