forked from n8fr8/securereader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake-release-build
More file actions
executable file
·45 lines (36 loc) · 1.01 KB
/
Copy pathmake-release-build
File metadata and controls
executable file
·45 lines (36 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
set -e
set -x
if [ -e ~/.android/bashrc ]; then
. ~/.android/bashrc
else
echo "No ~/.android/bashrc found, 'android' and 'ndk-build' must be in PATH"
fi
projectroot=`pwd`
projectname=`sed -n 's,.*name="app_name">\(.*\)<.*,\1,p' app/res/values/strings.xml`
TIMESTAMP=`git log -n1 --date=iso | sed -n 's,^Date:\(.*\),\1,p'`
if [ $1 = "--hard-reset" ]; then
git reset --hard
git clean -fdx
git submodule foreach --recursive git reset --hard
git submodule foreach --recursive git clean -fdx
fi
git submodule sync --recursive
git submodule foreach --recursive git submodule sync
git submodule update --init --recursive
./setup-ant.sh
./fix-support-library.sh
if [ -e ~/.android/ant.properties ]; then
cp ~/.android/ant.properties $projectroot/app/
else
echo "skipping release ant.properties"
fi
./setup-ant.sh
cd app/
faketime "$TIMESTAMP" ant release
apk=$projectroot/app/bin/$projectname-release.apk
if [ -e $apk ]; then
gpg --detach-sign $apk
else
echo $apk does not exist!
fi