Skip building prebuilt tarball if directory exists but is empty
This commit is contained in:
parent
17feead1af
commit
563bb4b721
1 changed files with 14 additions and 1 deletions
|
@ -134,8 +134,21 @@
|
|||
|
||||
<Target Name="CreatePrebuiltsTarball"
|
||||
AfterTargets="Build"
|
||||
Condition="Exists('$(ResultingPrebuiltPackagesDir)')">
|
||||
DependsOnTargets="
|
||||
CheckIfPrebuiltsExistToPack;
|
||||
CreatePrebuiltsTarballIfPrebuiltsExist"/>
|
||||
|
||||
<Target Name="CheckIfPrebuiltsExistToPack">
|
||||
<!-- Directory existence doesn't mean there are files inside. Use a pattern to find files. -->
|
||||
<ItemGroup>
|
||||
<PrebuiltFile Include="$(ResultingPrebuiltPackagesDir)**" />
|
||||
</ItemGroup>
|
||||
|
||||
<Message Text="Found @(PrebuiltFile->Count()) files in prebuilt packages dir." Importance="High" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CreatePrebuiltsTarballIfPrebuiltsExist"
|
||||
Condition="'@(PrebuiltFile->Count())' != '0'">
|
||||
<PropertyGroup>
|
||||
<TarballFileVersion>$(PrivateSourceBuiltPrebuiltsPackageVersionPrefix)$([MSBuild]::Add($(PrivateSourceBuiltPrebuiltsPackageVersionSuffix), 1))</TarballFileVersion>
|
||||
<TarballFilePath>$(OutputPath)$(SourceBuiltPrebuiltsTarballName).$(TarballFileVersion).tar.gz</TarballFilePath>
|
||||
|
|
Loading…
Reference in a new issue