Skip to content

Commit 0e3634d

Browse files
Copilotbartelink
andauthored
Move package validation enablement to targets
Agent-Logs-Url: https://github.com/jet/equinox/sessions/0e68e429-5b38-4688-9e94-88d2522d81db Co-authored-by: bartelink <206668+bartelink@users.noreply.github.com>
1 parent 6ba1417 commit 0e3634d

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
<!-- We want to opt in to publishing nugets per library, but only when CI=true -->
1818
<IsPackable>false</IsPackable>
19-
<EnablePackageValidation Condition=" '$(CI)' == 'true' and '$(IsPackable)' == 'true' ">true</EnablePackageValidation>
2019
<PackageOutputPath>$(MSBuildThisFileDirectory)artifacts\nupkg</PackageOutputPath>
2120
<GenerateDocumentationFile Condition=" '$(CI)' == 'true' and '$(IsPackable)' == 'true' ">true</GenerateDocumentationFile>
2221
</PropertyGroup>

Directory.Build.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<Target Name="ComputeFileVersion" BeforeTargets="Build">
99
<PropertyGroup>
1010
<GeneratePackageOnBuild Condition=" '$(CI)' == 'true' and '$(IsPackable)' == 'true' ">true</GeneratePackageOnBuild>
11+
<EnablePackageValidation Condition=" '$(CI)' == 'true' and '$(IsPackable)' == 'true' ">true</EnablePackageValidation>
1112
</PropertyGroup>
1213
</Target>
13-
</Project>
14+
</Project>

src/Directory.Build.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
<PropertyGroup>
44
<IsPackable>true</IsPackable>
55
</PropertyGroup>
6+
<ItemGroup Condition="'$(CI)' == 'true' and '$(PackageValidationBaselinePath)' == '' and '$(PackageValidationBaselineVersion)' != ''">
7+
<PackageDownload Include="$([MSBuild]::ValueOrDefault('$(PackageValidationBaselineName)', '$(PackageId)'))" Version="[$(PackageValidationBaselineVersion)]" />
8+
</ItemGroup>
69
</Project>

tools/Directory.Build.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
<PropertyGroup>
44
<IsPackable>true</IsPackable>
55
</PropertyGroup>
6+
<ItemGroup Condition="'$(CI)' == 'true' and '$(PackageValidationBaselinePath)' == '' and '$(PackageValidationBaselineVersion)' != ''">
7+
<PackageDownload Include="$([MSBuild]::ValueOrDefault('$(PackageValidationBaselineName)', '$(PackageId)'))" Version="[$(PackageValidationBaselineVersion)]" />
8+
</ItemGroup>
69
</Project>

0 commit comments

Comments
 (0)