forked from jsargiot/visual-coverage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
VisualCoverage.build
106 lines (90 loc) · 4.2 KB
/
VisualCoverage.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
<?xml version="1.0"?>
<project name="VisualCoverage" default="all">
<description>
VisualCoverage
MIT License Copyright (c) 2012 Joaquin Sargiotto ([email protected]).
</description>
<property name="BUILD.number" value="3" />
<property name="VERSION.major" value="1" />
<property name="VERSION.minor" value="0" />
<property name="VERSION.patch" value="0" />
<property name="VERSION.build" value="${BUILD.number}" />
<property name="VERSION.full" value="${VERSION.major}.${VERSION.minor}.${VERSION.patch}.${VERSION.build}" />
<!-- Build configuration -->
<property name="BUILD.version" value="${VERSION.major}.${VERSION.minor}.${VERSION.patch}.${VERSION.build}" />
<property name="BUILD.dir" value="${project::get-base-directory()}/build/${project::get-name()}" />
<property name="BUILD.debug" value="true" />
<!-- Directory where all the 3rd party libs are -->
<property name="LIB.dir" value="${project::get-base-directory()}/lib" />
<!-- Documentation folder -->
<property name="DOC.dir" value="${project::get-base-directory()}/doc" />
<!--
The "init" target defines the basic initial information for the build.
-->
<target name="init">
<!-- Generate the source file holding the common assembly-level attributes -->
<asminfo output="src/CommonAssemblyInfo.cs" language="CSharp">
<imports>
<import namespace="System" />
<import namespace="System.Reflection" />
<import namespace="System.Runtime.InteropServices" />
</imports>
<attributes>
<attribute type="AssemblyProductAttribute" value="${project::get-name()}" />
<attribute type="AssemblyDescriptionAttribute" value="A Tool to create a clover report from Visual Studio Coverage files." />
<attribute type="AssemblyCopyrightAttribute" value="Copyright (C) 2012-2023 Joaquin Sargiotto" />
<attribute type="AssemblyVersionAttribute" value="${BUILD.version}" />
<attribute type="AssemblyInformationalVersionAttribute" value="${BUILD.version}" />
</attributes>
</asminfo>
</target>
<!--
The "all" target is a shortcut for running the "clean" target followed
by the "build" target, to force a complete recompile.
-->
<target name="all" depends="clean, build, package" />
<!--
The "build" compiles the source code. In this case, we call all
the subprojects buildfiles to build. They (should) know what to do.
-->
<target name="build" depends="init">
<!-- Ensure bin directory exists -->
<echo message="Build Directory is ${BUILD.dir}" />
<!-- Ensure bin directory exists -->
<mkdir dir="${BUILD.dir}/bin" />
<!-- copy libraries to BUILD.dir -->
<copy todir="${BUILD.dir}/bin">
<fileset basedir="${LIB.dir}">
<include name="**/*" />
</fileset>
</copy>
<!-- build components -->
<nant buildfile="src/VisualCoverage.Core/VisualCoverage.Core.build" target="build" />
<nant buildfile="src/VisualCoverage.Console/VisualCoverage.Console.build" target="build" />
</target>
<!--
The "package" target creates a zip file to distribute the application.
-->
<target name="package">
<!-- copy documentation to BUILD.dir -->
<copy todir="${BUILD.dir}">
<fileset basedir="${DOC.dir}">
<include name="**/*" />
</fileset>
</copy>
<copy todir="${BUILD.dir}" file="README.md" />
<!-- Create package -->
<property name="zip_prefix" value="${project::get-name()}-${VERSION.full}" />
<zip zipfile="${project::get-base-directory()}/build/${project::get-name()}-${VERSION.full}-bin.zip">
<fileset basedir="${BUILD.dir}" prefix="${zip_prefix}">
<include name="**/*" />
</fileset>
</zip>
</target>
<!--
The "clean" target deletes any previous "build" directory.
-->
<target name="clean">
<delete dir="${BUILD.dir}" if="${directory::exists(BUILD.dir)}" />
</target>
</project>