forked from guardianproject/cacheword
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake-release-build
More file actions
executable file
·37 lines (30 loc) · 844 Bytes
/
Copy pathmake-release-build
File metadata and controls
executable file
·37 lines (30 loc) · 844 Bytes
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
#!/bin/bash
# bash is required because we need bash's printf to guarantee a cross-platform
# timestamp format.
set -e
set -x
if [ -z $ANDROID_HOME ]; then
if [ -e ~/.android/bashrc ]; then
. ~/.android/bashrc
else
echo "ANDROID_HOME must be set!"
exit
fi
fi
projectroot=`pwd`
# standardize timezone to reduce build differences
export TZ=UTC
# run the clock at 5% speed, ant requires a moving clock
TIMESTAMP=`printf '@%(%Y-%m-%d %H:%M:%S)T x0.05' \
$(git log -n1 --format=format:%at)`
git reset --hard
git clean -fdx
cd cachewordlib
android update lib-project --path .
if [ -e ~/.android/ant.properties ]; then
cp ~/.android/ant.properties .
faketime -f "$TIMESTAMP" ant release
else
echo "skipping release ant.properties, making debug build"
faketime -f "$TIMESTAMP" ant debug
fi