annotate build.xml @ 830:ef19cc8d5bc1

support parameters throug file for every mercurial command
author eugene.petrenko@jetbrains.com
date Fri, 30 May 2014 18:38:47 +0200
parents 31a1aca3305c
children
rev   line source
732
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
1 <!--
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
2 ~ Copyright 2000-2014 JetBrains s.r.o.
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
3 ~
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
4 ~ Licensed under the Apache License, Version 2.0 (the "License");
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
5 ~ you may not use this file except in compliance with the License.
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
6 ~ You may obtain a copy of the License at
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
7 ~
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
8 ~ http://www.apache.org/licenses/LICENSE-2.0
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
9 ~
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
10 ~ Unless required by applicable law or agreed to in writing, software
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
11 ~ distributed under the License is distributed on an "AS IS" BASIS,
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
13 ~ See the License for the specific language governing permissions and
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
14 ~ limitations under the License.
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
15 -->
31a1aca3305c Update copyright
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 266
diff changeset
16
266
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
17 <project name="Mercurial VCS Support" default="dist" basedir=".">
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
18 <property file="mercurial.properties"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
19 <import file="mercurial.xml"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
20
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
21 <property name="distPath" value="${basedir}/dist"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
22
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
23 <property name="plugin.name" value="mercurial"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
24
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
25 <property name="build.number" value=""/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
26 <tstamp>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
27 <format property="timestamp" pattern="yyyyMMddhhmmss"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
28 </tstamp>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
29 <property name="snapshot.build.number" value="SNAPSHOT-${timestamp}"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
30 <property name="build.vcs.number" value=""/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
31
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
32 <condition property="plugin.version" value="${snapshot.build.number}" else="${build.number}">
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
33 <matches pattern="snapshot-.*" string="${build.number}" casesensitive="false"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
34 </condition>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
35
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
36 <import file="teamcity-common.xml"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
37
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
38 <target name="package" depends="define.version">
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
39 <package.teamcity.plugin name="${plugin.name}"
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
40 server.output="${mercurial-server.output.dir}"
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
41 agent.output="${mercurial-agent.output.dir}"
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
42 common.output="${mercurial-common.output.dir}"
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
43 plugin.descriptor.file="${basedir}/teamcity-plugin.xml"
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
44 plugin.version="${plugin.version}"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
45 </target>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
46
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
47 <target name="define.version" depends="define.version.if.under.teamcity">
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
48 <tstamp>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
49 <format property="current.time" pattern="yyyyMMddHHmm"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
50 </tstamp>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
51 <property name="plugin.version" value="SNAPSHOT-${current.time}"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
52 </target>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
53
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
54 <target name="define.version.if.under.teamcity" if="build.number">
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
55 <property name="plugin.version" value="${build.number}"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
56 </target>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
57
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
58 <target name="dist" depends="check.teamcitydistribution,all,package"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
59
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
60 <target name="deploy" depends="dist">
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
61 <deploy.teamcity.plugin name="${plugin.name}"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
62 </target>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
63
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
64 <taskdef name="testng" classname="org.testng.TestNGAntTask" classpath="${basedir}/mercurial-tests/lib/testng-5.7-jdk15.jar"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
65
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
66 <path id="tests_classpath">
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
67 <pathelement location="${agent.home.dir}/lib/runtime-util.jar"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
68 <pathelement location="${agent.home.dir}/lib/buildServerRuntimeUtil.jar"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
69 <path refid="mercurial-tests.runtime.module.classpath"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
70 </path>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
71
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
72 <target name="run-tests" depends="clean, init, compile.module.mercurial-tests">
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
73 <property name="suspend" value="n"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
74
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
75 <testng haltonfailure="no" failureProperty="failure_found" listener="org.testng.reporters.TestHTMLReporter"
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
76 outputdir="${basedir}/test-output" classpathref="tests_classpath" dumpcommand="true" workingDir="${basedir}">
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
77
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
78 <jvmarg value="-ea"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
79 <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=${suspend},address=5555"/>-->
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
80
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
81 <sysproperty key="java.awt.headless" value="true"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
82
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
83 <xmlfileset dir="${basedir}/mercurial-tests/src">
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
84 <include name="testng.xml"/>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
85 </xmlfileset>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
86 </testng>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
87 </target>
643fa1236f4e Fix file encoding
Dmitry Neverov <dmitry.neverov@jetbrains.com>
parents: 166
diff changeset
88 </project>