diff options
author | Torne (Richard Coles) <torne@wolfpuppy.org.uk> | 2012-10-28 10:10:10 +0000 |
---|---|---|
committer | Torne (Richard Coles) <torne@wolfpuppy.org.uk> | 2012-10-28 10:11:21 +0000 |
commit | c86b65112cfa06ec5cc9810c5751c64714e66c48 (patch) | |
tree | fd01c993c83fbe438b477d393b03b1b235d5a4f7 | |
parent | 9ed7b4fd299fd5007b602f70e472d69fbd66ebf4 (diff) | |
download | connectbot-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-- | .gitignore | 1 | ||||
-rw-r--r-- | build.xml | 5 | ||||
-rw-r--r-- | res/values/version.xml | 4 |
3 files changed, 9 insertions, 1 deletions
@@ -2,5 +2,4 @@ bin gen launchpad-*.tar.gz local.properties -res/values/version.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> |