-
Notifications
You must be signed in to change notification settings - Fork 1
/
package-plugin.build
61 lines (55 loc) · 2.25 KB
/
package-plugin.build
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
<?xml version="1.0"?>
<project name="TeamCity Plugin" default="full">
<property name="java.bin" value="C:\Program Files\Java\jdk1.8.0_251\bin" />
<property name="jar.filename" value="spira-teamcity-plugin.jar" />
<property name="teamcity.plugins" value="C:\ProgramData\JetBrains\TeamCity\plugins" />
<target name="makejar" description="Packages the binaries into a JAR archive">
<echo message="Making the JAR file"/>
<exec program="${java.bin}\jar" verbose="true" workingdir="${nant.project.basedir}\bin">
<arg value="cfv" />
<arg value="${nant.project.basedir}\${jar.filename}" />
<arg value="com\inflectra\spiratest\plugins\*.class" />
<arg value="com\inflectra\spiratest\plugins\teamcity\*.class" />
<arg value="com\inflectra\spiratest\plugins\model\*.class" />
</exec>
<exec program="${java.bin}\jar" verbose="true" workingdir="${nant.project.basedir}">
<arg value="ufv" />
<arg value="${nant.project.basedir}\${jar.filename}" />
<arg value="META-INF\*.xml" />
<arg value="buildServerResources\*.jsp" />
</exec>
<echo message="Viewing the JAR file " />
<exec program="${java.bin}\jar" verbose="true">
<arg value="tf" />
<arg value="${jar.filename}" />
</exec>
</target>
<target name="zipup" description="Zips up the plugin">
<echo message="Zipping up entire plugin" />
<zip zipfile="SpiraTeam-CI-Integration.zip" verbose="true" comment="TeamCity Plugin for SpiraTest">
<fileset>
<include name="teamcity-plugin.xml" />
</fileset>
<fileset prefix="server">
<include name="${jar.filename}" />
</fileset>
<fileset prefix="server" basedir="lib">
<include name="*.jar" />
</fileset>
</zip>
</target>
<target name="deploy" description="deploy to teamcity">
<echo message="deploy to teamcity" />
<copy file="SpiraTeam-CI-Integration.zip" tofile="${teamcity.plugins}\SpiraTeam-CI-Integration.zip" />
<exec program="net" verbose="true">
<arg value="stop" />
<arg value="TeamCity" />
</exec>
<exec program="net" verbose="true">
<arg value="start" />
<arg value="TeamCity" />
</exec>
</target>
<target name="full" description="Builds the whole plugin and zips it up" depends="makejar,zipup,deploy">
</target>
</project>