Commit 649eb54a authored by ArnoldZokas's avatar ArnoldZokas

Fixed a bug in the build process that caused ReleaseBinaries package to be…

Fixed a bug in the build process that caused ReleaseBinaries package to be populated with redundant empty directories
parent 865de6a2
......@@ -34,14 +34,19 @@
</Target>
<!--## 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">
<Copy SourceFiles="@(DynamicPackageItem)" DestinationFolder="$(BuildOutputDirectory)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)" />
</Target>
<Target Name="_GeneratePackage">
<ItemGroup><ExistingArchives Include="$(BuildOutputDirectory)\*.zip" /></ItemGroup>
<Delete Files="@(ExistingArchives)" />
<Copy SourceFiles="@(StaticPackageItem)" DestinationFolder="$(BuildOutputDirectory)\%(StaticPackageItem.TargetDirectory)\%(StaticPackageItem.RecursiveDir)" />
<Exec Command="&quot;$(ZipExePath)&quot; a -tzip $(PackageName) * -r" WorkingDirectory="$(BuildOutputDirectory)" />
......
@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"
IF ERRORLEVEL 1 GOTO END
......
@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"
IF ERRORLEVEL 1 GOTO END
......
......@@ -95,6 +95,7 @@
<!-- targets -->
<Target Name="Build" DependsOnTargets="_Compile;_Test" />
<Target Name="PrepareOutputDirectory" DependsOnTargets="_CleanOutputDirectory" />
<Target Name="PreparePackageComponent" DependsOnTargets="_PreparePackageComponent" />
<Target Name="GeneratePackage" DependsOnTargets="_GeneratePackage" />
<Target Name="RunBenchmarks" DependsOnTargets="_RunBenchmarks" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment