Skip to content

Commit

Permalink
Check shipping packages for poison (#47176)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaMilosavljevic authored Mar 3, 2025
1 parent 6bc6fe5 commit 335c7db
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/SourceBuild/content/eng/finish-source-only.proj
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,22 @@
Outputs="$(BaseIntermediateOutputPath)ReportPoisonUsage.complete" >
<ItemGroup>
<!-- Exclude the Private.SourceBuilt.Artifacts archive from poison usage scan. -->
<PoisonFileToCheck Include="$(ArtifactsAssetsDir)*$(ArchiveExtension)" />
<PoisonFileToCheck Remove="$(ArtifactsAssetsDir)$(SourceBuiltArtifactsTarballName)*" />
<AssetToCheck Include="$(ArtifactsAssetsDir)*$(ArchiveExtension)" />
<AssetToCheck Remove="$(ArtifactsAssetsDir)$(SourceBuiltArtifactsTarballName)*" />
<!-- Include shipping nuget packages. -->
<PoisonFileToCheck Include="$(ArtifactsShippingPackagesDir)*.nupkg" />
<ShippingPackageToCheck Include="$(ArtifactsShippingPackagesDir)**/*.nupkg" />
<!-- Add and mark SBRP packages to validate that they have the correct poison attribute. -->
<PoisonFileToCheck Include="$(ReferencePackagesDir)**\*.nupkg" IsSourceBuildReferencePackage="true" />
<SbrpPackageToCheck Include="$(ReferencePackagesDir)**\*.nupkg" IsSourceBuildReferencePackage="true" />
</ItemGroup>

<Error Condition="'@(AssetToCheck)' == ''" Text="No assets will be poison checked - this is unexpected!" />
<Error Condition="'@(ShippingPackageToCheck)' == ''" Text="No shipping packages will be poison checked - this is unexpected!" />
<Error Condition="'@(SbrpPackageToCheck)' == ''" Text="No SBRP packages will be poison checked - this is unexpected!" />

<ItemGroup>
<PoisonFileToCheck Include="@(AssetToCheck)" />
<PoisonFileToCheck Include="@(ShippingPackageToCheck)" />
<PoisonFileToCheck Include="@(SbrpPackageToCheck)" />
</ItemGroup>

<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Checking @(PoisonFileToCheck) for poisoned files." />
Expand Down

0 comments on commit 335c7db

Please sign in to comment.