aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@wolfpuppy.org.uk>2012-10-28 10:10:10 +0000
committerTorne (Richard Coles) <torne@wolfpuppy.org.uk>2012-10-28 10:11:21 +0000
commitc86b65112cfa06ec5cc9810c5751c64714e66c48 (patch)
treefd01c993c83fbe438b477d393b03b1b235d5a4f7
parent9ed7b4fd299fd5007b602f70e472d69fbd66ebf4 (diff)
downloadconnectbot-c86b65112cfa06ec5cc9810c5751c64714e66c48.tar.gz
connectbot-c86b65112cfa06ec5cc9810c5751c64714e66c48.tar.bz2
connectbot-c86b65112cfa06ec5cc9810c5751c64714e66c48.zip
Handle git version differently to fix Eclipse builds.
Unfortunately Eclipse appears to be too dumb to generate the version and build it correctly (even using an external build step it fails to rebuild resources afterward), so go back to having a dummy version checked into the repository. Run git update-index --assume-unchanged on the file before updating the version, so that git doesn't consider the file to have changed, instead.
-rw-r--r--.gitignore1
-rw-r--r--build.xml5
-rw-r--r--res/values/version.xml4
3 files changed, 9 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 7829861..61075a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,4 @@ bin
gen
launchpad-*.tar.gz
local.properties
-res/values/version.xml
*~
diff --git a/build.xml b/build.xml
index b7e3e32..aebe4f9 100644
--- a/build.xml
+++ b/build.xml
@@ -126,6 +126,11 @@
<xpath input="AndroidManifest.xml" expression="/manifest/@android:versionName"
output="manifest.version.name" />
+ <!-- tell git to ignore changes to the version xml -->
+ <exec executable="git">
+ <arg line="update-index --assume-unchanged res/values/version.xml"/>
+ </exec>
+
<!-- find out the description of the current Git commit -->
<exec executable="git" outputproperty="git.revision">
<arg line="describe --match 'v[0-9]*' --dirty"/>
diff --git a/res/values/version.xml b/res/values/version.xml
new file mode 100644
index 0000000..94227c9
--- /dev/null
+++ b/res/values/version.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="msg_version" translatable="false">ConnectBot (working copy)</string>
+</resources>