Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

104 lines (80 sloc) 3.727 kb
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Paths to various parts of the build -->
<PropertyGroup>
<OutputDir>dist</OutputDir>
<Productname>fluentmigrator</Productname>
<SolutionFile>$(MSBuildProjectDirectory)\FluentMigrator (2010).sln</SolutionFile>
</PropertyGroup>
<ItemGroup>
<Platform Include="x86" />
<Platform Include="Any CPU" />
</ItemGroup>
<ItemGroup>
<Version Include="v3.5" />
<Version Include="v4.0" />
</ItemGroup>
<PropertyGroup>
<Configuration Condition="$(Configuration)==''">Release</Configuration>
</PropertyGroup>
<!-- Deletes the output folders from pervious builds for a clean build -->
<Target Name="_Clean" Condition="Exists($(OutputDir))">
<Message Text="Removing old build Files" />
<RemoveDir Directories="$(OutputDir)" />
</Target>
<!-- Generate the diffent combinations of platforms and version -->
<Target Name="_GenerateDeploymentMatrix" DependsOnTargets="_Clean">
<CreateItem Include="@(Platform)" AdditionalMetadata="Version=%(Version.Identity)">
<Output ItemName="CompileTarget" TaskParameter="Include"/>
</CreateItem>
</Target>
<!-- Default Target for kicking of the build process -->
<Target Name="Build" DependsOnTargets="_GenerateDeploymentMatrix">
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildForFlavor" Properties="Platform=%(CompileTarget.Identity);Version=%(CompileTarget.Version);" />
</Target>
<Choose>
<When Condition="'$(Version)'=='v3.5'">
<ItemGroup>
<ConfigFileToDelete Include="$(OutputDir)\console-$(Platform)-$(Version)\Migrate.exe.config" />
<ConfigFileToRename Include="$(OutputDir)\console-$(Platform)-$(Version)\app.35.config" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<ConfigFileToDelete Include="$(Empty)" />
<ConfigFileToRename Include="$(Empty)" />
</ItemGroup>
</Otherwise>
</Choose>
<!-- Create the top level dist directory -->
<Target Name="_CreateDistDirectory" DependsOnTargets="_Clean">
<MakeDir Directories="$(OutputDir)" />
</Target>
<!-- Create a directory for each build flavor -->
<Target Name="_CreateDeploymentDirectory">
<MakeDir Directories="$(OutputDir)\console-$(Platform)-$(Version)" />
</Target>
<!-- Build each flavor and move them to there final directory -->
<Target Name="_Build" DependsOnTargets="_CreateDeploymentDirectory">
<Message Importance="High" Text="Build the console app for target .NET Framework version $(Version) on $(Platform)" />
<MSBuild Projects="$(SolutionFile)" Properties="Configuration=$(Configuration);Platform=$(Platform);TargetFrameworkVersion=$(Version);" />
</Target>
<Target Name="_CopyToDistDir" DependsOnTargets="_Build">
<Message Text="Copying Output For .NET Framework version $(Version) on $(Platform)" />
<ItemGroup>
<FilesToDeploy Include="
src/FluentMigrator.Console/bin/Release/*.*;
src/FluentMigrator.Nant/bin/Release/FluentMigrator.Nant.*;
src/FluentMigrator.MSBuild/bin/Release/FluentMigrator.MSBuild.*;
"/>
</ItemGroup>
<Copy SourceFiles="@(FilesToDeploy)" DestinationFolder="$(OutputDir)\console-$(Platform)-$(Version)\%(RecursiveDir)" />
</Target>
<Target Name="_ReplaceAppConfigWithCorrectVersion" DependsOnTargets="_CopyToDistDir">
<Delete Files="@(ConfigFileToDelete)" />
<Copy SourceFiles="@(ConfigFileToRename )" DestinationFiles="$(OutputDir)\console-$(Platform)-$(Version)\Migrate.exe.config" />
<Delete Files="$(OutputDir)\console-$(Platform)-$(Version)\app.35.config" />
</Target>
<Target Name="_BuildForFlavor" DependsOnTargets="_ReplaceAppConfigWithCorrectVersion">
</Target>
</Project>
Jump to Line
Something went wrong with that request. Please try again.