forked from tSQLt-org/tSQLt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtSQLt.buildCLR.xml
More file actions
99 lines (87 loc) · 4.05 KB
/
Copy pathtSQLt.buildCLR.xml
File metadata and controls
99 lines (87 loc) · 4.05 KB
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
<?xml version="1.0"?>
<project name="tSQLt" default="all" basedir=".">
<description>Build tSQLt</description>
<target name="validate.parameters" description="">
<antcall target="validate.parameter">
<param name="parameter.name" value="msbuild.path" />
</antcall>
<echo message="${msbuild.path}" />
</target>
<target
name="all"
depends="validate.parameters, init, clr.compile, tSQLtAssemblyKey.compile, clr.testutil.compile, clr.UnsignedEmpty.compile, package.files"
/>
<!--=======================================================================-->
<!--======== Misc =========-->
<!--=======================================================================-->
<target name="init" description="prepare output directory">
<mkdir dir="output" />
<delete dir="temp"/>
<mkdir dir="temp"/>
<mkdir dir="temp/tSQLtCLR"/>
<property name="build.configuration" value="CruiseControl" />
</target>
<target name="validate.parameter">
<fail message="Parameter '${parameter.name}' is required">
<condition>
<not>
<and>
<isset property="${parameter.name}"/>
</and>
</not>
</condition>
</fail>
</target>
<!--=======================================================================-->
<!--======== Build tSQLt CLRs =========-->
<!--=======================================================================-->
<target name="clr.compile">
<echo message="Compile CLR Command: "${msbuild.path}\msbuild.exe" tSQLtCLR.csproj /p:Configuration=${build.configuration} /nologo"/>
<delete dir="../tSQLtCLR/tSQLtCLR/bin/${build.configuration}" />
<delete dir="../tSQLtCLR/tSQLtCLR/obj/${build.configuration}" />
<exec executable="cmd" dir="../tSQLtCLR/tSQLtCLR/" failonerror="true">
<arg value="/c"/>
<arg value=""${msbuild.path}\msbuild.exe" tSQLtCLR.csproj /p:Configuration=${build.configuration} /nologo"/>
</exec>
</target>
<target name="tSQLtAssemblyKey.compile">
<echo message="Compile CLR Command: "${msbuild.path}\msbuild.exe" tSQLtAssemblyKey.csproj /p:Configuration=${build.configuration} /nologo"/>
<delete dir="../tSQLtCLR/tSQLtAssemblyKey/bin/${build.configuration}" />
<delete dir="../tSQLtCLR/tSQLtAssemblyKey/obj/${build.configuration}" />
<exec executable="cmd" dir="../tSQLtCLR/tSQLtAssemblyKey/" failonerror="true">
<arg value="/c"/>
<arg value=""${msbuild.path}\msbuild.exe" tSQLtAssemblyKey.csproj /p:Configuration=${build.configuration} /nologo"/>
</exec>
</target>
<target name="clr.testutil.compile">
<echo message="Compile CLR Command: "${msbuild.path}\msbuild.exe" tSQLtTestUtilCLR.csproj /p:Configuration=${build.configuration} /nologo"/>
<delete dir="../tSQLtCLR/tSQLtTestUtilCLR/bin/${build.configuration}" />
<delete dir="../tSQLtCLR/tSQLtTestUtilCLR/obj/${build.configuration}" />
<exec executable="cmd" dir="../tSQLtCLR/tSQLtTestUtilCLR/" failonerror="true">
<arg value="/c"/>
<arg value=""${msbuild.path}\msbuild.exe" tSQLtTestUtilCLR.csproj /p:Configuration=${build.configuration} /nologo"/>
</exec>
</target>
<target name="clr.UnsignedEmpty.compile">
<echo message="Compile CLR Command: "${msbuild.path}\msbuild.exe" UnsignedEmpty.csproj /p:Configuration=${build.configuration} /nologo"/>
<delete dir="../tSQLtCLR/UnsignedEmpty/bin/${build.configuration}" />
<delete dir="../tSQLtCLR/UnsignedEmpty/obj/${build.configuration}" />
<exec executable="cmd" dir="../tSQLtCLR/UnsignedEmpty/" failonerror="true">
<arg value="/c"/>
<arg value=""${msbuild.path}\msbuild.exe" UnsignedEmpty.csproj /p:Configuration=${build.configuration} /nologo"/>
</exec>
</target>
<target name="package.files">
<copy todir="temp/tSQLtCLR" flatten="true">
<fileset dir="../tSQLtCLR">
<include name="*/bin/${build.configuration}/*.dll"/>
</fileset>
</copy>
<delete file="output/tSQLtCLR.zip" />
<zip zipfile="output/tSQLtCLR.zip">
<fileset dir="temp/tSQLtCLR">
<include name="*.*"/>
</fileset>
</zip>
</target>
</project>