-
Notifications
You must be signed in to change notification settings - Fork 1
/
NDDDSample.build
153 lines (135 loc) · 6.37 KB
/
NDDDSample.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
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?xml version="1.0"?>
<project name="NDDDSample" default="all">
<property name="solution.dir" value="src"/>
<property name="solution.file" value="NDDDSample-full-with-setup.sln"/>
<property name="build.base" value="build"/>
<property name="nant.settings.currentframework" value="net-3.5" />
<property name="build.dir.absolutepath" value="${path::get-full-path(build.base)}" />
<property name="nunit.libfile.nddsample" value="NDDDSample.Tests.dll" />
<property name="nunit.libfile.registerApp" value="NDDDSample.RegisterApp.Tests.dll" />
<property name="nunit.outfile.nddsample" value="${nunit.libfile.nddsample}-Results.xml" />
<property name="nunit.outfile.registerApp" value="${nunit.libfile.registerApp}-Results.xml" />
<property name="vs" value="C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" />
<target name="build" depends="clean, init, compile, copy_files"/>
<target name="all" depends="build, test"/>
<target name="clean" description="delete build artifacts">
<delete dir="${build.base}" failonerror="false" />
</target>
<target name="init" description="Initializes build properties">
<tstamp>
<formatter property="datetime.buildtime" pattern="yyyy-MM-dd, HH:mm:ss" />
</tstamp>
<delete dir="${build.base}"/>
<mkdir dir="${build.base}"/>
<echo message="Current Directory: ${project::get-base-directory()}"/>
</target>
<target name="compile"
depends="init"
description="compiles the application">
<exec program="${framework::get-framework-directory(framework::get-target-framework())}\msbuild.exe"
commandline="${solution.file} /t:Clean /t:Rebuild /p:Configuration=Release;Platform="Any CPU" /l:FileLogger,Microsoft.Build.Engine;logfile=${build.base}\build.log" verbose="true"/>
</target>
<target name="copy_files" description="Copy files">
<mkdir dir="${build.base}\NDDDSample.Web" failonerror="true" />
<copy todir="${build.base}\NDDDSample.Web">
<fileset basedir="${solution.dir}\NDDDSample\app\presentation\NDDDSample.Web">
<include name="**/*.*"/>
<exclude name="**/*.cs" />
<exclude name="**/*.proj" />
<exclude name="**/*.csproj" />
<exclude name="**/*.pdb" />
</fileset>
</copy>
<mkdir dir="${build.base}\NDDDSample.Interfaces.BookingRemoteService.Host" failonerror="true" />
<copy todir="${build.base}\NDDDSample.Interfaces.BookingRemoteService.Host">
<fileset basedir="${solution.dir}\NDDDSample\app\interfaces\NDDDSample.Interfaces.BookingRemoteService.Host\bin\Release">
<include name="**/*.*"/>
<exclude name="**/*.cs" />
<exclude name="**/*.proj" />
<exclude name="**/*.csproj" />
<exclude name="**/*.pdb" />
</fileset>
</copy>
<mkdir dir="${build.base}\NDDDSample.Interfaces.HandlingService.Host" failonerror="true" />
<copy todir="${build.base}\NDDDSample.Interfaces.HandlingService.Host">
<fileset basedir="${solution.dir}\NDDDSample\app\interfaces\NDDDSample.Interfaces.HandlingService.Host\bin\Release">
<include name="**/*.*"/>
<exclude name="**/*.cs" />
<exclude name="**/*.proj" />
<exclude name="**/*.csproj" />
<exclude name="**/*.pdb" />
</fileset>
</copy>
<mkdir dir="${build.base}\NDDDSample.Interfaces.PathfinderRemoteService.Host" failonerror="true" />
<copy todir="${build.base}\NDDDSample.Interfaces.PathfinderRemoteService.Host">
<fileset basedir="${solution.dir}\NDDDSample\app\interfaces\NDDDSample.Interfaces.PathfinderRemoteService.Host\bin\Release">
<include name="**/*.*"/>
<exclude name="**/*.cs" />
<exclude name="**/*.proj" />
<exclude name="**/*.csproj" />
<exclude name="**/*.pdb" />
</fileset>
</copy>
<mkdir dir="${build.base}\NDDDSample.RegisterApp" failonerror="true" />
<copy todir="${build.base}\NDDDSample.RegisterApp">
<fileset basedir="${solution.dir}\RegisterApp\NDDDSample.RegisterApp\bin\Release">
<include name="**/*.*"/>
<exclude name="**/*.cs" />
<exclude name="**/*.proj" />
<exclude name="**/*.csproj" />
<exclude name="**/*.pdb" />
</fileset>
</copy>
<mkdir dir="${build.base}\NDDDSample.Tests" failonerror="true" />
<copy todir="${build.base}\NDDDSample.Tests">
<fileset basedir="${solution.dir}\NDDDSample\test\NDDDSample.Tests\bin\Release">
<include name="**/*.*"/>
<exclude name="**/*.cs" />
<exclude name="**/*.proj" />
<exclude name="**/*.csproj" />
<exclude name="**/*.pdb" />
</fileset>
</copy>
<mkdir dir="${build.base}\NDDDSample.RegisterApp.Tests" failonerror="true" />
<copy todir="${build.base}\NDDDSample.RegisterApp.Tests">
<fileset basedir="${solution.dir}\RegisterApp\NDDDSample.RegisterApp.Tests\bin\Release">
<include name="**/*.*"/>
<exclude name="**/*.cs" />
<exclude name="**/*.proj" />
<exclude name="**/*.csproj" />
<exclude name="**/*.pdb" />
</fileset>
</copy>
</target>
<target name="test" description="Running NunitTest">
<echo message="Tested Library File is: ${build.base}/NDDDSample.Tests/${nunit.libfile.nddsample}"/>
<exec basedir="tools\nunit"
workingdir="${build.base}\NDDDSample.Tests"
program="nunit-console-x86.exe"
commandline="${nunit.libfile.nddsample}"
failonerror="true"/>
<echo message="Tested Library File is: ${build.base}/NDDDSample.RegisterApp.Tests/${nunit.libfile.registerApp}"/>
<exec basedir="tools\nunit"
workingdir="${build.base}\NDDDSample.RegisterApp.Tests"
program="nunit-console-x86.exe"
commandline="${nunit.libfile.registerApp}"
failonerror="true"/>
</target>
<target name="setup" description="Preparing setup file">
<echo message="Installing Cassini Web Server"/>
<exec program="tools\UltiDevCassiniWebServer\UltiDevCassiniWS_SetupPrereq_VS2008.exe"
failonerror="true"/>
<echo message="Visual Studio path: ${vs}"/>
<exec program="${vs}"
commandline="${solution.file} /project NDDDSample.Web.Setup /build release"
failonerror="true"/>
<mkdir dir="${build.base}\NDDDSample.Web.Setup" failonerror="true" />
<copy todir="${build.base}\NDDDSample.Web.Setup">
<fileset basedir="${solution.dir}\NDDDSample\app\presentation\NDDDSample.Web.Setup\Release">
<include name="**/*.*"/>
</fileset>
</copy>
<exec program="build\NDDDSample.Web.Setup\setup.exe"
failonerror="true"/>
</target>
</project>