Permalink
Browse files

tweaking @ferventcoder's build updates

  • Loading branch information...
1 parent 482dc76 commit 30cd6e53164d725db8e3176aa63e35dcde8d31da @half-ogre half-ogre committed Apr 25, 2012
Showing with 12 additions and 20 deletions.
  1. +2 −1 .gitignore
  2. +10 −19 Scripts/NuGetGallery.msbuild
View
@@ -8,4 +8,5 @@ App_Data
_AzurePackage
*.bak
NuGetGallery.sln.docstates
-_ReSharper.NuGetGallery
+_ReSharper.NuGetGallery
+_PackagedWebsite
@@ -5,38 +5,29 @@
<PropertyGroup>
<Platform>Any CPU</Platform>
- <BuildDirectory>bin\</BuildDirectory>
- <BuildPath>$(SolutionDir)..\$(BuildDirectory)</BuildPath>
- <MigrationsFile>$(BuildPath)\_PublishedWebsites\WebSite\bin\NuGetGallery.Website.dll</MigrationsFile>
+ <OutDir>$(SolutionDir)..\Website\bin\</OutDir>
+ <PackagedWebsiteDir>$(SolutionDir)..\_PackagedWebsite</PackagedWebsiteDir>
</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);Platform=$(Platform);OutDir=$(BuildPath)"/>
- <RemoveDir Directories="$(BuildPath)" ContinueOnError="true" />
+ <MSBuild Projects="..\NuGetGallery.sln" Targets="Clean" Properties="Configuration=$(Configuration);Platform=$(Platform);OutDir=$(OutDir)"/>
+ <Exec Command="rd $(PackagedWebsiteDir) /s /q" />
</Target>
<Target Name="Build" DependsOnTargets="Clean">
- <MSBuild Projects="..\NuGetGallery.sln" Targets="Build" Properties="Configuration=$(Configuration);CodeAnalysis=true;Platform=$(Platform);OutDir=$(BuildPath)" />
+ <MSBuild Projects="..\NuGetGallery.sln" Targets="Build" Properties="Configuration=$(Configuration);CodeAnalysis=true;Platform=$(Platform);OutDir=$(OutDir)" />
+ <Exec Command="xcopy.exe $(OutDir)_PublishedWebsites\Website $(PackagedWebsiteDir)\ /ey" />
+ <Exec Command="rd $(OutDir)_PublishedWebsites /s /q" />
</Target>
<Target Name="RunFacts" DependsOnTargets="Build">
- <xunit Assembly="$(BuildPath)\NuGetGallery.Facts.dll" Xml="NuGetGallery.Facts.results.xml" />
+ <xunit Assembly="$(OutDir)\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;CleanBuildOutput" />
+ <Target Name="CIBuild" DependsOnTargets="RunFacts" />
- <Target Name="FullBuild" DependsOnTargets="RunFacts;CleanBuildOutput" />
+ <Target Name="FullBuild" DependsOnTargets="RunFacts" />
</Project>

0 comments on commit 30cd6e5

Please sign in to comment.