This repository has been archived by the owner on Jan 4, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.proj
42 lines (35 loc) · 1.61 KB
/
build.proj
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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Deploy">
<ItemGroup>
<PackageReference Include="NuGet.CommandLine">
<Version>4.9.2</Version>
</PackageReference>
</ItemGroup>
<!-- Required to support command " msbuild .\build.proj /t:restore" -->
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- Version, adjust before build -->
<PropertyGroup>
<Version>0.3.4.0</Version>
<VersionShort>0.3.4</VersionShort>
</PropertyGroup>
<!-- Tools -->
<PropertyGroup>
<NuGetCommandLine>$(UserProfile)\.nuget\packages\nuget.commandline\4.9.2\tools\NuGet.exe</NuGetCommandLine>
</PropertyGroup>
<Target Name="Clean">
<RemoveDir Directories="target" />
</Target>
<Target Name="Compile">
<Exec Command="$(NuGetCommandLine) restore OpenCoverToCoberturaConverter.sln" />
<MSBuild Projects="OpenCoverToCoberturaConverter.sln" Properties="Configuration=Release" />
<RemoveDir Directories="bin" />
<RemoveDir Directories="obj" />
</Target>
<Target Name="Deploy" DependsOnTargets="Clean; Compile">
<MakeDir Directories="target" />
<Exec Command="$(NuGetCommandLine) pack Deployment\nuget\OpenCoverToCoberturaConverter.nuspec -OutputDirectory target\packages -Version $(Version)" />
</Target>
<Target Name="Publish" DependsOnTargets="Deploy">
<Exec Command="$(NuGetCommandLine) push .\target\packages\OpenCoverToCoberturaConverter.$(VersionShort).nupkg -ApiKey $(NugetApiKey) -Source https://www.nuget.org/api/v2/package" />
</Target>
</Project>