Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Azure.Cli/Azure.Cli.pack.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!-- Pointer vs RID pack. Imported only by Azure.Cli.csproj; not shipped. -->
<PropertyGroup>
<AzureCliPackageId Condition="'$(AzureCliPackageId)' == ''">$(PackageId)</AzureCliPackageId>
<NoWarn>$(NoWarn);NU5100;NU5110;NU5111;NU5118;NU5119;NU5128;NU5129</NoWarn>
<IncludeBuildOutput Condition="'$(RuntimeIdentifier)' == ''">true</IncludeBuildOutput>
<IncludeBuildOutput Condition="'$(RuntimeIdentifier)' != ''">false</IncludeBuildOutput>
<SuppressDependenciesWhenPacking Condition="'$(RuntimeIdentifier)' != ''">true</SuppressDependenciesWhenPacking>
Expand Down
11 changes: 10 additions & 1 deletion src/Directory.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@
<PropertyGroup>
<Product>azx</Product>
<ImplicitUsings>true</ImplicitUsings>
<!--
Pack analysis assumes a typical .NET library. The Azure CLI Payload and PackAsTool
host trip these constantly and none of them are actionable:
NU5100 assemblies outside lib/, NU5110/NU5111 .ps1 files that are not NuGet install
scripts (azps.ps1, Activate.ps1), NU5118/NU5119 payload collisions and dotfiles,
NU5123 paths > 200 chars in the CLI tree, NU5128/NU5129 TFM/lib and build/.targets
naming that do not apply to RID/tool packs.
-->
<NoWarn>$(NoWarn);NU5100;NU5110;NU5111;NU5118;NU5119;NU5123;NU5128;NU5129</NoWarn>
</PropertyGroup>
</Project>
</Project>
5 changes: 5 additions & 0 deletions src/Tests/PackTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ public void Pointer_and_rid_csproj_use_pack_split()
Assert.Contains("$(AzureCliPackageId).$(RuntimeIdentifier)", packTargets);
Assert.DoesNotContain("runtimes/$(RuntimeIdentifier)/native/", packTargets);

var directoryProps = File.ReadAllText(Path.Combine(repo, "src", "Directory.props"));
Assert.Contains("NU5100;NU5110;NU5111;NU5118;NU5119;NU5123;NU5128;NU5129", directoryProps);
Assert.DoesNotContain("<NoWarn>", packTargets);

var consumer = File.ReadAllText(Path.Combine(repo, "src", "Azure.Cli", "buildTransitive", "azx.cli.targets"));
Assert.Contains("IncludeAzureCliPayload", consumer);
Assert.Contains(@"TargetPath>az\", consumer.Replace('/', '\\'));
Expand All @@ -77,6 +81,7 @@ public void Pointer_and_rid_csproj_use_pack_split()
Assert.Contains("<ToolPackageRuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64;osx-arm64</ToolPackageRuntimeIdentifiers>", azx);
Assert.Contains("""<PackageReference Include="azx.cli" Version="$(Version)" />""", azx);
Assert.DoesNotContain("NuGetizer", azx, StringComparison.OrdinalIgnoreCase);
Assert.DoesNotContain("<NoWarn>", azx);
Assert.Contains("Readme", azx);
var nuget = File.ReadAllText(Path.Combine(repo, "src", "azx", "nuget.config"));
Assert.Contains("key=\"local\"", nuget);
Expand Down
1 change: 0 additions & 1 deletion src/azx/azx.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<ToolCommandName>azx</ToolCommandName>
<ToolPackageRuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64;osx-arm64</ToolPackageRuntimeIdentifiers>
<IsPackable>true</IsPackable>
<NoWarn>$(NoWarn);NU5128</NoWarn>
<RestoreSources>https://api.nuget.org/v3/index.json</RestoreSources>
<RestoreSources Condition="Exists('$(PackageOutputPath)')">$(PackageOutputPath);$(RestoreSources)</RestoreSources>
<RestoreIgnoreFailedSources>true</RestoreIgnoreFailedSources>
Expand Down
Loading