Revision 45bc8e17 make-release-build
make-release-build | ||
---|---|---|
5 | 5 |
set -e |
6 | 6 |
set -x |
7 | 7 |
|
8 |
if [ -z $ANDROID_HOME ]; then |
|
9 |
if [ -e ~/.android/bashrc ]; then |
|
10 |
. ~/.android/bashrc |
|
11 |
else |
|
12 |
echo "ANDROID_HOME must be set!" |
|
13 |
exit |
|
14 |
fi |
|
15 |
fi |
|
16 |
|
|
8 | 17 |
# standardize timezone to reduce build differences |
9 | 18 |
export TZ=UTC |
10 |
# run the clock at 5% speed, ant requires a moving clock |
|
11 |
TIMESTAMP=`printf '@%(%Y-%m-%d %H:%M:%S)T x0.05' \ |
|
12 |
$(git log -n1 --format=format:%at)` |
|
13 | 19 |
|
14 | 20 |
git reset --hard |
15 | 21 |
git clean -fdx |
... | ... | |
18 | 24 |
./setup-ant |
19 | 25 |
|
20 | 26 |
ant release-all |
27 |
|
|
28 |
jarname=trustedintents-$(git describe) |
|
29 |
rm -f ${jarname}*.asc |
|
30 |
|
|
31 |
# standardize timestamps in ZIP headers |
|
32 |
if which strip-nondeterminism > /dev/null; then |
|
33 |
for f in ${jarname}*.jar; do |
|
34 |
strip-nondeterminism -t jar -T $(git log -n1 --format=format:%at) $f |
|
35 |
done |
|
36 |
fi |
|
37 |
|
|
38 |
for f in ${jarname}*.jar; do |
|
39 |
sha256sum $f |
|
40 |
done |
|
41 |
|
|
42 |
if which gpg > /dev/null; then |
|
43 |
if [ -z "`gpg --list-secret-keys`" ]; then |
|
44 |
echo "No GPG secret keys found, not signing APK" |
|
45 |
else |
|
46 |
for f in ${jarname}*.*; do |
|
47 |
gpg --armor --detach-sign $f |
|
48 |
done |
|
49 |
fi |
|
50 |
else |
|
51 |
echo "gpg not found, not signing APK" |
|
52 |
fi |
Also available in: Unified diff