Skip to content

Commit

Permalink
Correctly set IsPackable to false for non source projects (#181)
Browse files Browse the repository at this point in the history
* Correctly set IsPackable to false for non source projects

* Change switch to OverrideIsPackableForNonSourceProjects
  • Loading branch information
ViktorHofer authored Nov 18, 2024
1 parent a30a2fe commit cf6c8aa
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'$(IsTestUtilityProject)' != 'true'">true</IsSourceProject>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)unsetispackable.targets" Condition="'$(UnsetIsPackableForNonSourceProjects)' == 'true' and '$(IsSourceProject)' != 'true'" />
<Import Project="$(RepositoryEngineeringDir)overrideispackable.targets" Condition="'$(OverrideIsPackableForNonSourceProjects)' == 'true' and '$(IsSourceProject)' != 'true'" />
<Import Project="$(RepositoryEngineeringDir)resources.targets" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />

Expand Down
9 changes: 9 additions & 0 deletions eng/overrideispackable.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project TreatAsLocalProperty="IsPackable">

<!-- Treat global IsPackable property as local.
Explicitly set to false as NuGet.targets would set an empty value back to true. -->
<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion eng/pipelines/maintenance-packages-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ stages:
--prepareMachine
/p:Test=false
/p:IsPackable=true
/p:UnsetIsPackableForNonSourceProjects=true
/p:OverrideIsPackableForNonSourceProjects=true
$(_AdditionalBuildArgs)
$(_InternalBuildArgs)
displayName: 'Build and pack'
Expand Down
8 changes: 0 additions & 8 deletions eng/unsetispackable.targets

This file was deleted.

0 comments on commit cf6c8aa

Please sign in to comment.