Permalink
Browse files

Extract version from viewclient.py for ant build

  • Loading branch information...
1 parent 840a7a8 commit ec029d1ec63a40155476d3818c1ebd425af75a8e @dtmilano committed Apr 24, 2013
Showing with 15 additions and 2 deletions.
  1. +15 −1 AndroidViewClient/build.xml
  2. +0 −1 AndroidViewClient/project.properties
@@ -3,7 +3,21 @@
<property file="ant.properties" />
<loadproperties srcFile="project.properties" />
+ <property name="versionRE" value="^\s*__version__\s*=\s*'(.*)'\s*$" />
+ <loadfile srcfile="src/com/dtmilano/android/viewclient.py" property="avc.version">
+ <filterchain>
+ <linecontainsregexp>
+ <regexp pattern="${versionRE}" />
+ </linecontainsregexp>
+ <tokenfilter>
+ <replaceregex pattern="${versionRE}" replace="\1" />
+ </tokenfilter>
+ <striplinebreaks />
+ </filterchain>
+ </loadfile>
+
<target name="jar" >
- <jar destfile="bin/${avc.jarname}-${avc.jarversion}.jar" basedir="src/" />
+ <echo message="Creating ${avc.jarname} ${avc.version} jar ..." />
+ <jar destfile="bin/${avc.jarname}-${avc.version}.jar" basedir="src/" />
</target>
</project>
@@ -1,3 +1,2 @@
# Culebra
avc.jarname=androidviewclient
-avc.jarversion=2.3.12

0 comments on commit ec029d1

Please sign in to comment.