Skip to content

Commit

Permalink
Disable NuGetPack module if AlternatePack is being used.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeago committed Jul 18, 2023
1 parent 631cf74 commit 1c2cd8b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Project>

<PropertyGroup>
<!-- Put packages in artifacts folder. -->
<PackageOutputPath>$(ArtifactsDirectory)$(Configuration)\</PackageOutputPath>
<!-- Make Owners default to Authors. -->
<Owners Condition="'$(Owners)' == ''">$(Authors)</Owners>
</PropertyGroup>

<Import Project="Readme.targets" />
<Import Project="License.targets" />
<Import Project="ThirdPartyNotices.targets" />
<Import Project="PackageIcon.targets" />

<!-- Coalesce PackageRequireLicenseAcceptance to a boolean value. Default is false. -->
<PropertyGroup>
<PackageRequireLicenseAcceptance Condition="'$(LicensePackageExpression)' == '' And !$(LicenseFileInPackage)">false</PackageRequireLicenseAcceptance>
<PackageRequireLicenseAcceptance Condition="'$(PackageRequireLicenseAcceptance)' != 'true'">false</PackageRequireLicenseAcceptance>
</PropertyGroup>

<!-- Coalesce other properties. -->
<PropertyGroup>
<DevelopmentDependency Condition="'$(DevelopmentDependency)' != 'true'">false</DevelopmentDependency>
<PackageType Condition="'$(PackageType)' == ''">Dependency</PackageType>
<Serviceable Condition="'$(Serviceable)' != 'false'">true</Serviceable>
</PropertyGroup>

<Import Project="NuspecFile.targets" />

</Project>
32 changes: 8 additions & 24 deletions src/Buildvana.Sdk/Modules/NuGetPack/Module.Core.targets
Original file line number Diff line number Diff line change
@@ -1,30 +1,14 @@
<Project>

<PropertyGroup>
<!-- Put packages in artifacts folder. -->
<PackageOutputPath>$(ArtifactsDirectory)$(Configuration)\</PackageOutputPath>
<!-- Make Owners default to Authors. -->
<Owners Condition="'$(Owners)' == ''">$(Authors)</Owners>
<!-- IsPackable default = true for libraries, otherwise false. -->
<PropertyGroup Condition="'$(IsPackable)' == ''">
<IsPackable Condition="'$(BV_IsLibraryProject)' == 'true'">true</IsPackable>
</PropertyGroup>

<Import Project="Readme.targets" />
<Import Project="License.targets" />
<Import Project="ThirdPartyNotices.targets" />
<Import Project="PackageIcon.targets" />

<!-- Coalesce PackageRequireLicenseAcceptance to a boolean value. Default is false. -->
<PropertyGroup>
<PackageRequireLicenseAcceptance Condition="'$(LicensePackageExpression)' == '' And !$(LicenseFileInPackage)">false</PackageRequireLicenseAcceptance>
<PackageRequireLicenseAcceptance Condition="'$(PackageRequireLicenseAcceptance)' != 'true'">false</PackageRequireLicenseAcceptance>
<PropertyGroup Condition="'$(IsPackable)' != 'true'">
<IsPackable>false</IsPackable>
</PropertyGroup>

<!-- Coalesce other properties. -->
<PropertyGroup>
<DevelopmentDependency Condition="'$(DevelopmentDependency)' != 'true'">false</DevelopmentDependency>
<PackageType Condition="'$(PackageType)' == ''">Dependency</PackageType>
<Serviceable Condition="'$(Serviceable)' != 'false'">true</Serviceable>
</PropertyGroup>

<Import Project="NuspecFile.targets" />

<Import Project="$(MSBuildThisFileDirectory)Module.Core.PackableProject.targets"
Condition="$(IsPackable)" />

</Project>
10 changes: 1 addition & 9 deletions src/Buildvana.Sdk/Modules/NuGetPack/Module.targets
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
<Project>

<!-- IsPackable default = true for libraries, otherwise false. -->
<PropertyGroup Condition="'$(IsPackable)' == ''">
<IsPackable Condition="'$(BV_IsLibraryProject)' == 'true'">true</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="'$(IsPackable)' != 'true'">
<IsPackable>false</IsPackable>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)Module.Core.targets"
Condition="$(IsPackable)" />
Condition="!$(UsingAlternatePack)" />

</Project>

0 comments on commit 1c2cd8b

Please sign in to comment.