This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
forked from mongodb-csharp/mongodb-csharp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Deploy.proj
61 lines (44 loc) · 2.42 KB
/
Deploy.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="deploy" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- $Id: Task.proj 135 2006-03-19 01:02:09Z pwelter34 $ -->
<PropertyGroup>
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\tools\MSBuild.Community.Tasks</MSBuildCommunityTasksPath>
<ExtensionTasksPath>$(MSBuildProjectDirectory)\tools\MSBuild.ExtensionPack</ExtensionTasksPath>
<DeployPath>$(MSBuildProjectDirectory)\redist</DeployPath>
<DeployTmp>$(DeployPath)\tmp</DeployTmp>
<SourceProject>$(MSBuildProjectDirectory)\MongoDB-CSharp.sln</SourceProject>
</PropertyGroup>
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets"/>
<Target Name="releasebuild">
<ItemGroup>
<ProjectToBuild Include="$(MSBuildProjectDirectory)\source\MongoDB\MongoDB.csproj" />
<ProjectToBuild Include="$(MSBuildProjectDirectory)\source\MongoDB.GridFS\MongoDB.GridFS.csproj" />
</ItemGroup>
<MSBuild Projects="@(ProjectToBuild)" Targets="Rebuild" Properties="Configuration=Release" />
</Target>
<Target Name="deploy" DependsOnTargets="releasebuild">
<PropertyGroup>
<DeployFile>$(DeployPath)\MongoDB-CSharp.zip</DeployFile>
</PropertyGroup>
<Delete Files="$(DeployFile)" />
<MakeDir Directories="$(DeployPath)" Condition="!Exists('$(DeployPath)')" />
<MakeDir Directories="$(DeployTmp)" Condition="!Exists('$(DeployTmp)')" />
<ItemGroup>
<CollectFiles Include="$(MSBuildProjectDirectory)\source\MongoDB\bin\Release\*.xml" />
<CollectFiles Include="$(MSBuildProjectDirectory)\source\MongoDB\bin\Release\*.dll" />
<CollectFiles Include="$(MSBuildProjectDirectory)\source\MongoDB.GridFS\bin\Release\*.xml" />
<CollectFiles Include="$(MSBuildProjectDirectory)\source\MongoDB.GridFS\bin\Release\*.dll" />
<CollectFiles Include="$(MSBuildProjectDirectory)\LICENSE" />
<CollectFiles Include="$(MSBuildProjectDirectory)\README.rst" />
</ItemGroup>
<Copy SourceFiles="@(CollectFiles)" DestinationFolder="$(DeployTmp)" />
<ItemGroup>
<DeployFiles Include="$(DeployTmp)\**\*.*" />
</ItemGroup>
<Zip Files="@(DeployFiles)"
WorkingDirectory="$(DeployTmp)"
ZipFileName="$(DeployFile)"
ZipLevel="9" />
<RemoveDir Directories="$(DeployTmp)" />
</Target>
</Project>