2017-12-02 05:04:39 +03:00
|
|
|
<!--
|
|
|
|
This file should be the last thing imported in KoreBuild to ensure target order is correct.
|
|
|
|
-->
|
|
|
|
<Project>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
2017-12-20 20:15:26 +03:00
|
|
|
<IgnoredArtifactItems>$(IgnoredArtifactItems);$(LogOutputDir)**\*;</IgnoredArtifactItems>
|
2017-12-02 05:04:39 +03:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(DisableDefaultTargets)' == 'true'">
|
|
|
|
<SkipArtifactVerification>true</SkipArtifactVerification>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
2018-03-09 03:19:59 +03:00
|
|
|
<PropertyGroup Condition="'$(SkipArtifactVerification)' != 'true'">
|
|
|
|
<RestoreDependsOn>$(RestoreDependsOn);CheckForUnknownArtifacts</RestoreDependsOn>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
2017-12-02 05:04:39 +03:00
|
|
|
<!--
|
|
|
|
###################################################################
|
2018-03-09 03:19:59 +03:00
|
|
|
Target: CheckForUnknownArtifacts
|
2017-12-02 05:04:39 +03:00
|
|
|
|
2018-03-09 03:19:59 +03:00
|
|
|
Verifies everything in artifacts/* is accounted for before build.
|
2017-12-02 05:04:39 +03:00
|
|
|
###################################################################
|
|
|
|
-->
|
|
|
|
|
2018-03-09 03:19:59 +03:00
|
|
|
<Target Name="CheckForUnknownArtifacts" DependsOnTargets="GetArtifactInfo">
|
2017-12-02 05:04:39 +03:00
|
|
|
<ItemGroup>
|
|
|
|
<_UnexpectedArtifact Remove="@(_UnexpectedArtifact)" />
|
|
|
|
<_UnexpectedArtifact Include="$(ArtifactsDir)**\*" Exclude="@(ArtifactInfo->'%(FullPath)');$(IgnoredArtifactItems)" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
2018-03-09 03:19:59 +03:00
|
|
|
<ArtifactErrorMessage />
|
2017-12-02 05:04:39 +03:00
|
|
|
<ArtifactErrorMessage Condition=" @(_UnexpectedArtifact->Count()) != 0 ">
|
|
|
|
Undeclared artifacts exist in $(ArtifactsDir).
|
2018-03-09 03:19:59 +03:00
|
|
|
Run /t:Clean or update repo.props to list known build output as an ArtifactInfo item.
|
2017-12-02 05:04:39 +03:00
|
|
|
Unexpected files:
|
|
|
|
- @(_UnexpectedArtifact, '%0A - ')
|
|
|
|
</ArtifactErrorMessage>
|
2018-03-09 03:19:59 +03:00
|
|
|
</PropertyGroup>
|
|
|
|
|
2018-04-11 02:54:15 +03:00
|
|
|
<Warning Text="$(ArtifactErrorMessage.Trim())"
|
|
|
|
Code="KRB5002"
|
|
|
|
Condition=" '$(ArtifactErrorMessage.Trim())' != '' AND '$(CI)' != 'true' " />
|
2018-03-09 03:19:59 +03:00
|
|
|
<Error Text="$(ArtifactErrorMessage.Trim())"
|
|
|
|
Code="KRB5002"
|
2018-04-11 02:54:15 +03:00
|
|
|
Condition=" '$(ArtifactErrorMessage.Trim())' != '' AND '$(CI)' == 'true' " />
|
2018-03-09 03:19:59 +03:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
###################################################################
|
|
|
|
Target: VerifyArtifacts
|
|
|
|
|
|
|
|
Verifies everything in artifacts/* is accounted for after build.
|
|
|
|
###################################################################
|
|
|
|
-->
|
|
|
|
|
|
|
|
<Target Name="VerifyArtifacts" Condition="'$(SkipArtifactVerification)' != 'true'" DependsOnTargets="GetArtifactInfo;CheckForUnknownArtifacts" AfterTargets="Package">
|
|
|
|
<ItemGroup>
|
|
|
|
<_ExpectedArtifact Remove="@(_ExpectedArtifact)" />
|
|
|
|
<_ExpectedArtifact Include="%(ArtifactInfo.Identity)" Condition=" ! Exists(%(ArtifactInfo.Identity))" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<ArtifactErrorMessage />
|
2017-12-02 05:04:39 +03:00
|
|
|
<ArtifactErrorMessage Condition=" @(_ExpectedArtifact->Count()) != 0 ">
|
|
|
|
$(ArtifactErrorMessage.Trim())
|
|
|
|
Expected items that do not exist:
|
|
|
|
- @(_ExpectedArtifact, '%0A - ')
|
|
|
|
</ArtifactErrorMessage>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
2018-04-11 02:54:15 +03:00
|
|
|
<Warning Text="$(ArtifactErrorMessage.Trim())"
|
|
|
|
Code="KRB5002"
|
|
|
|
Condition=" '$(ArtifactErrorMessage.Trim())' != '' AND '$(CI)' != 'true' " />
|
2017-12-02 05:04:39 +03:00
|
|
|
<Error Text="$(ArtifactErrorMessage.Trim())"
|
|
|
|
Code="KRB5002"
|
2018-04-11 02:54:15 +03:00
|
|
|
Condition=" '$(ArtifactErrorMessage.Trim())' != '' AND '$(CI)' == 'true' " />
|
2017-12-02 05:04:39 +03:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
</Project>
|