Skip to content

Commit

Permalink
Add MSBuild deployment script.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanwin committed May 8, 2010
1 parent 963a45f commit 21e4573
Show file tree
Hide file tree
Showing 7 changed files with 11,292 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -16,6 +16,7 @@

bin/
obj/
deploy/
test-results/
test-results/

Expand Down
53 changes: 53 additions & 0 deletions Deploy.proj
@@ -0,0 +1,53 @@
<?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>
<DeployPath>$(MSBuildProjectDirectory)\deploy</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">

<MakeDir Directories="$(DeployPath)" Condition="!Exists('$(DeployPath)')" />
<MakeDir Directories="$(DeployTmp)" Condition="!Exists('$(DeployTmp)')" />

<ItemGroup>
<CollectFiles Include="$(MSBuildProjectDirectory)\source\MongoDB\bin\Debug\*.dll" />
<CollectFiles Include="$(MSBuildProjectDirectory)\source\MongoDB\bin\Debug\*.xml" />
<CollectFiles Include="$(MSBuildProjectDirectory)\source\MongoDB.GridFS\bin\Debug\*.dll" />
<CollectFiles Include="$(MSBuildProjectDirectory)\source\MongoDB.GridFS\bin\Debug\*.xml" />
<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="$(DeployPath)\MongoDB-CSharp.zip"
ZipLevel="9" />

<RemoveDir Directories="$(DeployTmp)" />
</Target>

</Project>
3 changes: 2 additions & 1 deletion source/MongoDB.GridFS/MongoDB.GridFS.csproj
Expand Up @@ -45,7 +45,8 @@
<RegisterForComInterop>false</RegisterForComInterop>
<DocumentationFile>bin\Debug\MongoDB.GridFS.xml</DocumentationFile>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<NoWarn>618</NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
Expand Down
3 changes: 3 additions & 0 deletions source/MongoDB/MongoDB.csproj
Expand Up @@ -64,6 +64,9 @@
<GenerateDocumentation>true</GenerateDocumentation>
<DocumentationFile>bin\Release\MongoDB.xml</DocumentationFile>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>false</RunCodeAnalysis>
<DefineConstants>
</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
Expand Down

0 comments on commit 21e4573

Please sign in to comment.