better logging
[teamcity/git-plugin.git] / build / ant.build.xml
1 <project name="build hooks" default="replace-tokens-in-teamcity-plugin-xml" basedir=".">\r
2 \r
3 \r
4   <target name="replace-tokens-in-teamcity-plugin-xml">\r
5     <property name="home" value="${artifact.output.path}"/>\r
6 \r
7     <tstamp>\r
8       <format property="timestamp" pattern="yyyyMMddhhmmss"/>\r
9     </tstamp>\r
10 \r
11     <property name="snapshot.build.number" value="SNAPSHOT-${timestamp}"/>\r
12 \r
13     <condition property="plugin.version" value="${snapshot.build.number}" else="${build.number}">\r
14       <or>\r
15         <not>\r
16           <isset property="build.number"/>\r
17         </not>\r
18         <matches pattern="snapshot-.*" string="${build.number}" casesensitive="false"/>\r
19       </or>\r
20     </condition>\r
21 \r
22     <echo message="replacing tokens in teamcity-plugin.xml file under ${home}"/>\r
23     <echo message="Setting version to: ${plugin.version}"/>\r
24 \r
25     <!-- update all references in teamcity-plugin.xml files -->\r
26     <replace dir="${home}" summary="true">\r
27       <include name="**/teamcity-plugin.xml"/>\r
28       <replacefilter token="@version@" value="${plugin.version}"/>\r
29     </replace>\r
30   </target>\r
31 \r
32 </project>