Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Implemented a build.bat which loads up powershell and calls the build…

…-solution.ps1 file. The build packages everything up nicely into a top level bin folder ready for deployment.
  • Loading branch information...
commit 482dc76d72734d4f7a1416d5b47e510868d07079 1 parent 06f64f1
@ferventcoder ferventcoder authored half-ogre committed
Showing with 28 additions and 5 deletions.
  1. +23 −5 Scripts/NuGetGallery.msbuild
  2. +5 −0 build.bat
View
28 Scripts/NuGetGallery.msbuild
@@ -2,23 +2,41 @@
<PropertyGroup Condition="'$(Configuration)' == ''">
<Configuration>Debug</Configuration>
</PropertyGroup>
+
+ <PropertyGroup>
+ <Platform>Any CPU</Platform>
+ <BuildDirectory>bin\</BuildDirectory>
+ <BuildPath>$(SolutionDir)..\$(BuildDirectory)</BuildPath>
+ <MigrationsFile>$(BuildPath)\_PublishedWebsites\WebSite\bin\NuGetGallery.Website.dll</MigrationsFile>
+ </PropertyGroup>
<UsingTask AssemblyFile="../3rdParty\xunit\xunit.runner.msbuild.dll" TaskName="Xunit.Runner.MSBuild.xunit" />
<Target Name="Clean">
- <MSBuild Projects="..\NuGetGallery.sln" Targets="Clean" Properties="Configuration=$(Configuration)"/>
+ <MSBuild Projects="..\NuGetGallery.sln" Targets="Clean" Properties="Configuration=$(Configuration);Platform=$(Platform);OutDir=$(BuildPath)"/>
+ <RemoveDir Directories="$(BuildPath)" ContinueOnError="true" />
</Target>
<Target Name="Build" DependsOnTargets="Clean">
- <MSBuild Projects="..\NuGetGallery.sln" Targets="Build" Properties="Configuration=$(Configuration);CodeAnalysis=true;" />
+ <MSBuild Projects="..\NuGetGallery.sln" Targets="Build" Properties="Configuration=$(Configuration);CodeAnalysis=true;Platform=$(Platform);OutDir=$(BuildPath)" />
</Target>
<Target Name="RunFacts" DependsOnTargets="Build">
- <xunit Assembly="..\Facts\bin\$(Configuration)\NuGetGallery.Facts.dll" Xml="NuGetGallery.Facts.results.xml" />
+ <xunit Assembly="$(BuildPath)\NuGetGallery.Facts.dll" Xml="NuGetGallery.Facts.results.xml" />
+ </Target>
+
+ <Target Name="CleanBuildOutput">
+ <ItemGroup>
+ <FilesToRemove
+ Exclude="$(BuildPath)\_PublishedWebSites\**\*"
+ Include="$(BuildPath)\**\*"
+ />
+ </ItemGroup>
+ <Delete Files="@(FilesToRemove)" />
</Target>
- <Target Name="CIBuild" DependsOnTargets="RunFacts" />
+ <Target Name="CIBuild" DependsOnTargets="RunFacts;CleanBuildOutput" />
- <Target Name="FullBuild" DependsOnTargets="RunFacts" />
+ <Target Name="FullBuild" DependsOnTargets="RunFacts;CleanBuildOutput" />
</Project>
View
5 build.bat
@@ -0,0 +1,5 @@
+@echo off
+
+SET DIR=%~dp0%
+
+%windir%\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "& '%DIR%Build-Solution.ps1' %*"
Please sign in to comment.
Something went wrong with that request. Please try again.