[tor-commits] [orbot/master] ./jenkins-build script for standard Guardian Project Jenkins build

n8fr8 at torproject.org n8fr8 at torproject.org
Thu Jun 25 14:59:58 UTC 2015


commit 663cade62d47ddc594727c66260af3fae240ab63
Author: Hans-Christoph Steiner <hans at eds.org>
Date:   Wed Jun 3 16:04:05 2015 -0400

    ./jenkins-build script for standard Guardian Project Jenkins build
---
 jenkins-build |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/jenkins-build b/jenkins-build
new file mode 100755
index 0000000..c56d5b0
--- /dev/null
+++ b/jenkins-build
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+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
+
+if [ -z $ANDROID_NDK_HOME ]; then
+    if which ndk-build 2>&1 /dev/null; then
+        ANDROID_NDK_HOME=`which ndk-build |  sed 's,/ndk-build,,'`
+    else
+        echo "ANDROID_NDK_HOME not set and 'ndk-build' not in PATH"
+        exit
+    fi
+fi
+
+# reset version code/name to current date
+versionCodeDate=`date +%s`
+versionNameDate=`date +%Y-%m-%d_%H.%M.%S`
+
+sed -i \
+    -e "s,android:versionCode=\"[0-9][0-9]*\",android:versionCode=\"$versionCodeDate\"," \
+    -e "s,android:versionName=\"\([^\"][^\"]*\)\",android:versionName=\"\1.$versionNameDate\"," \
+    AndroidManifest.xml
+
+make -C external
+./setup-ant





More information about the tor-commits mailing list