Fixed a bug in the build process that caused ReleaseBinaries package to be populated with redundant empty directories

pull/288/head
ArnoldZokas 14 years ago
parent 865de6a290
commit 649eb54a99
  1. 11
      build/Common.targets
  2. 3
      build/GenerateCompletePackage.bat
  3. 3
      build/GenerateReleasePackage.bat
  4. 1
      build/build.csproj

@ -34,14 +34,19 @@
</Target> </Target>
<!--## Package Generation ##--> <!--## Package Generation ##-->
<Target Name="_CleanOutputDirectory">
<ItemGroup><DirectoriesToDelete Include="$([System.IO.Directory]::GetDirectories('$(BuildOutputDirectory)'))" /></ItemGroup>
<RemoveDir Directories="@(DirectoriesToDelete)" ContinueOnError="true" />
<ItemGroup><FilesToDelete Include="$(BuildOutputDirectory)\**\*.*" /></ItemGroup>
<Delete Files="@(FilesToDelete)" />
</Target>
<Target Name="_PreparePackageComponent"> <Target Name="_PreparePackageComponent">
<Copy SourceFiles="@(DynamicPackageItem)" DestinationFolder="$(BuildOutputDirectory)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)" /> <Copy SourceFiles="@(DynamicPackageItem)" DestinationFolder="$(BuildOutputDirectory)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)" />
</Target> </Target>
<Target Name="_GeneratePackage"> <Target Name="_GeneratePackage">
<ItemGroup><ExistingArchives Include="$(BuildOutputDirectory)\*.zip" /></ItemGroup>
<Delete Files="@(ExistingArchives)" />
<Copy SourceFiles="@(StaticPackageItem)" DestinationFolder="$(BuildOutputDirectory)\%(StaticPackageItem.TargetDirectory)\%(StaticPackageItem.RecursiveDir)" /> <Copy SourceFiles="@(StaticPackageItem)" DestinationFolder="$(BuildOutputDirectory)\%(StaticPackageItem.TargetDirectory)\%(StaticPackageItem.RecursiveDir)" />
<Exec Command="&quot;$(ZipExePath)&quot; a -tzip $(PackageName) * -r" WorkingDirectory="$(BuildOutputDirectory)" /> <Exec Command="&quot;$(ZipExePath)&quot; a -tzip $(PackageName) * -r" WorkingDirectory="$(BuildOutputDirectory)" />

@ -1,4 +1,7 @@
@ECHO OFF @ECHO OFF
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:PrepareOutputDirectory
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build;PreparePackageComponent /p:BuildConfiguration=Debug /p:Platform="Any CPU" %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build;PreparePackageComponent /p:BuildConfiguration=Debug /p:Platform="Any CPU"
IF ERRORLEVEL 1 GOTO END IF ERRORLEVEL 1 GOTO END

@ -1,4 +1,7 @@
@ECHO OFF @ECHO OFF
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:PrepareOutputDirectory
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU" %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU"
IF ERRORLEVEL 1 GOTO END IF ERRORLEVEL 1 GOTO END

@ -95,6 +95,7 @@
<!-- targets --> <!-- targets -->
<Target Name="Build" DependsOnTargets="_Compile;_Test" /> <Target Name="Build" DependsOnTargets="_Compile;_Test" />
<Target Name="PrepareOutputDirectory" DependsOnTargets="_CleanOutputDirectory" />
<Target Name="PreparePackageComponent" DependsOnTargets="_PreparePackageComponent" /> <Target Name="PreparePackageComponent" DependsOnTargets="_PreparePackageComponent" />
<Target Name="GeneratePackage" DependsOnTargets="_GeneratePackage" /> <Target Name="GeneratePackage" DependsOnTargets="_GeneratePackage" />
<Target Name="RunBenchmarks" DependsOnTargets="_RunBenchmarks" /> <Target Name="RunBenchmarks" DependsOnTargets="_RunBenchmarks" />

Loading…
Cancel
Save