forked from afonsoft/CxViewerVSIX
-
Notifications
You must be signed in to change notification settings - Fork 7
/
ci.msbuild
50 lines (41 loc) · 1.68 KB
/
ci.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
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
cmd samples:
msbuild ci.msbuild /t:CI - for build and pack
msbuild ci.msbuild /t:Pack - for pack
-->
<PropertyGroup>
<WorkingFolder>$(MSBuildProjectDirectory)</WorkingFolder>
<Configuration>Release</Configuration>
<Platform>x86</Platform>
<SolutionFile>$(WorkingFolder)\CxViewer.sln</SolutionFile>
<ProjectFile>$(WorkingFolder)\CxViewerVSIX\CxViewerVSIX.csproj</ProjectFile>
<MSBuildCommunityTasksPath>$(WorkingFolder)\.build</MSBuildCommunityTasksPath>
<ArtifactsFolder>$(WorkingFolder)\Artifacts</ArtifactsFolder>
<CodeCoverage></CodeCoverage>
</PropertyGroup>
<Import Project="$(WorkingFolder)\Build\.build\MSBuild.Community.Tasks.Targets" />
<Target Name="CI">
<CallTarget Targets="Build"/>
<CallTarget Targets="Pack"/>
</Target>
<Target Name="Build">
<Exec Command="$(WorkingFolder)\Build\.nuget\nuget restore $(SolutionFile)"/>
<MSBuild Projects="$(ProjectFile)" Targets="Rebuild"
Properties="Configuration=$(Configuration); Platform=$(Platform);" />
</Target>
<Target Name="Pack">
<CallTarget Targets="CleanupArtifacts"/>
<CallTarget Targets="CopyToArtifacts"/>
</Target>
<Target Name="CopyToArtifacts">
<Copy SourceFiles="$(WorkingFolder)\CxViewerVSIX\bin\x86\Release\CxViewerVSIX.vsix"
DestinationFiles="$(WorkingFolder)\Artifacts\CxViewerVSIX-2019.vsix" />
</Target>
<Target Name="CleanupArtifacts">
<RemoveDir Directories="$(ArtifactsFolder)"
Condition="Exists($(ArtifactsFolder))" />
<MakeDir Directories="$(ArtifactsFolder)"/>
</Target>
</Project>