-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
74 lines (59 loc) · 2.24 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
<project name="CHECKOUT-ASP-API" default="tests">
<property name="props" location="build.properties" />
<property name="versionp" location="version.properties" />
<property file="${props}" />
<property file="${versionp}" />
<property name="version" value="${build.version.major}.${build.version.minor}.${build.version.bug}" />
<property name="zipfile" value="klarna_${product}_${version}.zip" />
<patternset id="source">
<include name="Examples/*.asp" />
<include name="Source/*.asp" />
<include name="README.md" />
<include name="CHANGELOG" />
</patternset>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="package">
<zip basedir="${build.dir}" destfile="${zipfile}" description="zip file" />
<checksum file="${zipfile}" forceOverwrite="yes" />
</target>
<target name="dist" depends="clean">
<echo message="------------------------------------------------------------"/>
<echo message="Copy examples to Examples folder"/>
<mkdir dir="Examples"/>
<delete includeemptydirs="true">
<fileset dir="Examples" includes="**/*"/>
</delete>
<copy todir="Examples">
<fileset dir="Klarna.Asp.Examples" includes="*.asp"/>
</copy>
<echo message="------------------------------------------------------------"/>
<echo message="Copy source to Source folder"/>
<mkdir dir="Source"/>
<delete includeemptydirs="true">
<fileset dir="Source" includes="**/*"/>
</delete>
<copy todir="Source">
<fileset dir="Klarna.Asp" includes="*.asp"/>
</copy>
<echo message="------------------------------------------------------------"/>
<echo message="Create the build folder"/>
<copy todir="${build.dir}">
<fileset dir="." id="alldirs">
<patternset refid="source" />
</fileset>
</copy>
<echo message="------------------------------------------------------------"/>
<echo message="Create the zip file"/>
<antcall target="package" />
</target>
<target name="tests">
</target>
<target name="unittests">
<exec executable="nunit-console">
<arg value="-xml=TestResult.xml" />
<arg value="Klarna.Asp.Tests/bin/Release/Klarna.Asp.Tests.dll" />
</exec>
</target>
</project>