annotate build/ant.build.xml @ 719:59a3b5ef91a9

drop legacy
author eugene.petrenko@jetbrains.com
date Mon, 13 Jan 2014 19:42:22 +0100
parents 7a4ecffe34a9
children 31a1aca3305c
rev   line source
490
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
1 <project name="build hooks" default="replace-tokens-in-teamcity-plugin-xml" basedir=".">
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
2
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
3 <target name="replace-tokens-in-teamcity-plugin-xml">
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
4 <property name="home" value="${artifact.output.path}"/>
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
5
616
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
6 <tstamp>
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
7 <format property="timestamp" pattern="yyyyMMddhhmmss"/>
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
8 </tstamp>
490
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
9
616
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
10 <property name="snapshot.build.number" value="SNAPSHOT-${timestamp}"/>
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
11
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
12 <condition property="plugin.version" value="${snapshot.build.number}" else="${build.number}">
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
13 <or>
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
14 <not>
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
15 <isset property="build.number"/>
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
16 </not>
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
17 <matches pattern="snapshot-.*" string="${build.number}" casesensitive="false"/>
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
18 </or>
490
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
19 </condition>
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
20
616
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
21 <echo message="replacing tokens in teamcity-plugin.xml file under ${home}"/>
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
22 <echo message="Setting version to: ${plugin.version}"/>
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
23
490
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
24 <!-- update all references in teamcity-plugin.xml files -->
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
25 <replace dir="${home}" summary="true">
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
26 <include name="**/teamcity-plugin.xml"/>
616
7a4ecffe34a9 fix plugin version
Dmitry Neverov <dmitry.neverov@gmail.com>
parents: 490
diff changeset
27 <replacefilter token="@version@" value="${plugin.version}"/>
490
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
28 </replace>
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
29 </target>
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
30
f77000a89e97 Add idea artifacts
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents:
diff changeset
31 </project>