From ff5d2b571fa3963da2440c6f7d2536e0acb7c1dc Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 3 Jun 2014 14:55:42 -0400 Subject: [PATCH] include script for jenkins to run for setting up the ant build Jenkins will then call ant directly after running this script. This then sets the debug builds made by Jenkins to have a versionCode of the UNIX time in seconds and adds the data to the versionName. This clearly marks these as debug builds and also makes it possible to have an fdroid repo of debug builds that will automatically update after each build. --- jenkins-build | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 jenkins-build diff --git a/jenkins-build b/jenkins-build new file mode 100755 index 000000000..244766226 --- /dev/null +++ b/jenkins-build @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Jenkins uses this script to set up the ant build. Jenkins will then call +# ant itself once this script has completed. + +set -e +set -x + +# 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 + +. ~/.android/bashrc +./ant-prepare.sh