/
build.xml
executable file
·120 lines (94 loc) · 4.19 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<project name="git-custom-build" default="dist" basedir=".">
<property file="build.properties"/>
<property name="plugin.name" value="jetbrains.git"/>
<property name="build.number" value=""/>
<tstamp>
<format property="timestamp" pattern="yyyyMMddhhmmss"/>
</tstamp>
<property name="snapshot.build.number" value="SNAPSHOT-${timestamp}"/>
<property name="build.vcs.number" value=""/>
<condition property="plugin.version" value="${snapshot.build.number}" else="${build.number}">
<matches pattern="snapshot-.*" string="${build.number}" casesensitive="false"/>
</condition>
<property name="javac2.home" value="${basedir}/lib/compile/javac2"/>
<import file="teamcity-common.xml"/>
<import file="git-teamcity.xml"/>
<target name="package">
<package.teamcity.plugin name="${plugin.name}"
agent.output="${git-agent.output.dir}"
common.output="${git-common.output.dir}"
server.output="${git-server.output.dir}"
common.lib.dir="lib/common"
common.lib.includes="*.jar"
plugin.descriptor.file="teamcity-plugin.dist.xml"
plugin.version="${plugin.version}">
<server-additional-files>
<fileset dir="${basedir}" includes="license/**"/>
</server-additional-files>
<agent-additional-files>
<fileset dir="${basedir}" includes="lib/ssh/trilead-ssh2.jar"/>
</agent-additional-files>
</package.teamcity.plugin>
<mkdir dir="${basedir}/dist/src"/>
<zip basedir="${basedir}" destfile="${basedir}/dist/src/${plugin.name}-src.zip">
<include name="git-common/**"/>
<include name="git-agent/**"/>
<include name="git-server/**"/>
<include name="git-tests/**"/>
<include name="lib/**"/>
<include name="license/**"/>
<include name="*.iml"/>
<include name="*.ipr"/>
<include name="build.xml"/>
<include name="build.properties.dist"/>
<include name="git-teamcity.xml"/>
<include name="teamcity-common.xml"/>
</zip>
</target>
<target name="dist" depends="check.teamcitydistribution,all,package"/>
<target name="clean" depends="git-teamcity.clean">
<delete dir="dist" quiet="true"/>
</target>
<target name="deploy" depends="dist">
<deploy.teamcity.plugin name="${plugin.name}"/>
</target>
<taskdef name="testng" classname="org.testng.TestNGAntTask" classpath="${basedir}/git-tests/lib/testng-5.7-jdk15.jar"/>
<target name="run-tests" depends="clean, init, compile.module.git-tests.production">
<property name="suspend" value="n"/>
<testng haltonfailure="no"
failureProperty="failure_found"
listener="org.testng.reporters.TestHTMLReporter"
outputdir="${basedir}/test-output"
classpathref="git-tests.runtime.module.classpath"
workingdir="${basedir}"
dumpcommand="true">
<jvmarg value="-ea"/>
<!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=${suspend},address=5555"/>-->
<sysproperty key="java.awt.headless" value="true"/>
<xmlfileset dir="${basedir}/git-tests/src">
<include name="testng.xml"/>
</xmlfileset>
</testng>
</target>
<target name="run-all-tests" depends="clean, init, compile.module.git-tests.production">
<property name="suspend" value="n"/>
<testng haltonfailure="no"
failureProperty="failure_found"
listener="org.testng.reporters.TestHTMLReporter"
outputdir="${basedir}/test-output"
classpathref="git-tests.runtime.module.classpath"
workingdir="${basedir}"
dumpcommand="true">
<jvmarg value="-ea"/>
<!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=${suspend},address=5555"/>-->
<sysproperty key="java.awt.headless" value="true"/>
<xmlfileset dir="${basedir}/git-tests/src">
<include name="native-git-testng.xml"/>
<include name="testng.xml"/>
</xmlfileset>
</testng>
</target>
<target name="check_for_failures">
<fail if="failure_found" message="Failures found."/>
</target>
</project>