Skip to content

Commit

Permalink
Use IsPackable for ZipPublish.targets (#10636)
Browse files Browse the repository at this point in the history
  • Loading branch information
jviau authored Nov 14, 2024
1 parent 05fe9de commit f8b16d4
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<ArtifactsPath>$(MSBuildThisFileDirectory)out</ArtifactsPath>
<ArtifactsPublishOutputName>pub</ArtifactsPublishOutputName>
<ArtifactsPackageOutputName>pkg</ArtifactsPackageOutputName>
<IsPackable>false</IsPackable> <!-- default false -->
</PropertyGroup>

<!-- paths -->
Expand Down
2 changes: 1 addition & 1 deletion eng/build/ZipPublish.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<Target Name="ZipPublishArtifacts"
AfterTargets="Publish"
DependsOnTargets="PrepareZipArtifacts"
Condition="'$(ZipArtifactsPath)' != '' AND '@(ZipArtifact)' != '' AND '$(IsCrossTargetingBuild)' != 'true' AND '$(IsZippable)' == 'true'">
Condition="'$(ZipArtifactsPath)' != '' AND '@(ZipArtifact)' != '' AND '$(IsCrossTargetingBuild)' != 'true' AND '$(IsPackable)' == 'true'">
<ItemGroup Condition="'$(ZipArtifactsPath)' != ''">
<ZipArtifact Condition="'%(TargetPath)' == '' AND '%(TargetName)' != ''">
<TargetPath>$([MSBuild]::EnsureTrailingSlash('$(ZipArtifactsPath)'))%(TargetName)</TargetPath>
Expand Down
10 changes: 10 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))"
Condition="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../')) != ''" />

<!-- artifacts -->
<PropertyGroup>
<IsPackable>true</IsPackable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win</RuntimeIdentifier>
<SiteExtensionName>Functions</SiteExtensionName>
<IsZippable>true</IsZippable>
<CustomAfterNoTargets Condition="'$(TargetFramework)' != ''">$(MSBuildThisFileDirectory)Publish.SingleTFM.targets</CustomAfterNoTargets>
<CustomAfterNoTargets Condition="'$(TargetFramework)' == ''">$(MSBuildThisFileDirectory)Publish.MultiTFM.targets</CustomAfterNoTargets>
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
<AssemblyName>Microsoft.Azure.WebJobs.Script.Tests.Abstractions</AssemblyName>
<RootNamespace>Microsoft.Azure.WebJobs.Script.Tests.Abstractions</RootNamespace>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

<IsPackable>false</IsPackable>

<SignAssembly>true</SignAssembly>

<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<AssemblyName>Microsoft.Azure.WebJobs.Script.Tests.Integration</AssemblyName>
<RootNamespace>Microsoft.Azure.WebJobs.Script.Tests.Integration</RootNamespace>
<!-- Allow BinaryFormatter for tests -->
Expand Down
1 change: 0 additions & 1 deletion test/WebJobs.Script.Tests/WebJobs.Script.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
<AssemblyName>Microsoft.Azure.WebJobs.Script.Tests</AssemblyName>
<RootNamespace>Microsoft.Azure.WebJobs.Script.Tests</RootNamespace>
<LangVersion>preview</LangVersion>
Expand Down

0 comments on commit f8b16d4

Please sign in to comment.