forked from hoffmanc/FileHelpers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFileHelpers.msbuild
86 lines (70 loc) · 3.61 KB
/
FileHelpers.msbuild
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
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="pack-release" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Libs\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<UsingTask TaskName="NCoverExplorer.MSBuildTasks.NCoverExplorer" AssemblyFile="Libs\NCoverExplorer\NCoverExplorer.MSBuildTasks.dll" />
<UsingTask TaskName="NCoverExplorer.MSBuildTasks.NCover" AssemblyFile="Libs\NCoverExplorer\NCoverExplorer.MSBuildTasks.dll" />
<UsingTask TaskName="NCoverExplorer.MSBuildTasks.NUnitProject" AssemblyFile="Libs\NCoverExplorer\NCoverExplorer.MSBuildTasks.dll" />
<Import Project="CurrentVersion.msbuild" />
<ItemGroup>
<DebugFiles Include="Debug\**\*.*" />
<ReleaseFiles Include="Release\**\*.*" />
<OutputFiles Include="Output\**\*.*" />
</ItemGroup>
<Target Name="common">
<Message Text="##teamcity[buildNumber '$(CurrentVersion) ({build.number})']" />
<Copy SourceFiles="VersionInfo.cs" DestinationFolder="FileHelpers" />
<Exec Command="Libs\FileReplace.exe "FileHelpers\VersionInfo.cs" "-CustomVersion-" "$(FullCurrentVersion)"" />
<Delete Files="@(DebugFiles)" />
<Delete Files="@(ReleaseFiles)" />
<Delete Files="@(OutputFiles)" />
<MakeDir Directories="Output" ContinueOnError="True" />
</Target>
<Target Name="release" DependsOnTargets="common">
<MSBuild Projects="FileHelpers.sln" Properties="Configuration=Release" />
</Target>
<Target Name="debug" DependsOnTargets="common">
<MSBuild Projects="FileHelpers.sln" Properties="Configuration=Debug" />
</Target>
<Target Name="pack-release" DependsOnTargets="release">
<Zip Files="@(ReleaseFiles)" WorkingDirectory="Release" ZipFileName="Output\FileHelpers_Release_$(CurrentVersion).zip" />
</Target>
<Target Name="pack-debug" DependsOnTargets="debug">
<Zip Files="@(DebugFiles)" WorkingDirectory="Debug" ZipFileName="Output\FileHelpers_Debug_$(CurrentVersion).zip" />
</Target>
<PropertyGroup>
<CustomProjectPath>d:\Desarrollo\Devoo\FileHelpers\trunk\FileHelpers.shfbproj</CustomProjectPath>
</PropertyGroup>
<Import Project="FileHelpers.shfbproj" />
<Target Name="doc" DependsOnTargets="release">
<CallTarget Targets="Build" />
</Target>
<Target Name="test-gallio" DependsOnTargets="release"></Target>
<Target Name="coverage" DependsOnTargets="debug">
<ItemGroup>
<CoverageFile Include="$(MSBuildProjectDirectory)\Coverage\Coverage.xml" />
</ItemGroup>
<MakeDir Directories="$(MSBuildProjectDirectory)\Coverage" ContinueOnError="True" />
<NCover ToolPath="Libs\NCover\" CommandLineExe="Libs\NUnit\nunit-console-x86.exe" CoverageFile="@(CoverageFile)" AssemblyList="FileHelpers" CommandLineArgs="/noshadow FileHelpers.Tests\Release\FileHelpers.Tests.dll" />
<PropertyGroup>
<CoverageExclusions>
<CoverageExclusion>
<ExclusionType>Class</ExclusionType>
<Pattern>.*TypesOfMessages.*</Pattern>
<IsRegex>true</IsRegex>
</CoverageExclusion>
</CoverageExclusions>
</PropertyGroup>
<NCoverExplorer
ToolPath="Libs\NCoverExplorer\"
ProjectName="FileHelpers"
OutputDir="$(MSBuildProjectDirectory)\Coverage"
CoverageFiles="@(CoverageFile)"
SatisfactoryCoverage="80"
HtmlReportName="CoverageSummary.html"
Exclusions="$(CoverageExclusions)"
ShowExcluded="False"
ReportType="ModuleClassFunctionSummary"
/>
<Delete Files="@(CoverageFile)" ContinueOnError="True" />
</Target>
</Project>