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
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ jobs:
- name: ⚙ dotnet
uses: devlooped/actions-dotnet-env@v1

- name: 📦 GitHub.Cli
- name: 📦 gh.cli
run: |
$ErrorActionPreference = 'Stop'
dotnet pack src/GitHub.Cli/GitHub.Cli.csproj -c $env:Configuration -p:GeneratePackageOnBuild=false -bl:pointer-pack.binlog
if ($LASTEXITCODE -ne 0) { throw "GitHub.Cli pointer pack failed with exit code $LASTEXITCODE." }
if ($LASTEXITCODE -ne 0) { throw "gh.cli pointer pack failed with exit code $LASTEXITCODE." }
dotnet pack src/GitHub.Cli/GitHub.Cli.csproj -c $env:Configuration -r linux-x64 -p:GeneratePackageOnBuild=false -bl:pack-linux-x64.binlog
if ($LASTEXITCODE -ne 0) { throw "GitHub.Cli linux-x64 pack failed with exit code $LASTEXITCODE." }
if ($LASTEXITCODE -ne 0) { throw "gh.cli linux-x64 pack failed with exit code $LASTEXITCODE." }

- name: 🙏 build
run: dotnet build -m:1 -bl:build.binlog
Expand All @@ -71,9 +71,9 @@ jobs:
run: |
$ErrorActionPreference = 'Stop'
$script = Join-Path $pwd 'src/GitHub.Cli/unix-exec.ps1'
$cli = Get-ChildItem bin -Filter "GitHub.Cli.linux-x64.*.nupkg" | Where-Object Name -notlike '*.symbols.*' | Select-Object -First 1
$cli = Get-ChildItem bin -Filter "gh.cli.linux-x64.*.nupkg" | Where-Object Name -notlike '*.symbols.*' | Select-Object -First 1
$tool = Get-ChildItem bin -Filter "gh.linux-x64.*.nupkg" | Where-Object Name -notlike '*.symbols.*' | Select-Object -First 1
if (-not $cli) { throw "GitHub.Cli.linux-x64 nupkg not found" }
if (-not $cli) { throw "gh.cli.linux-x64 nupkg not found" }
if (-not $tool) { throw "gh.linux-x64 nupkg not found" }
foreach ($pkg in @($cli, $tool)) {
& pwsh -NoProfile -File $script -Nupkg $pkg.FullName -Assert
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ jobs:
$version = "-p:Version=$env:Version"
# Pointer packs restore the host RID Payload; RID packs reuse that tree.
dotnet pack src/GitHub.Cli/GitHub.Cli.csproj -c $env:Configuration $version -p:GeneratePackageOnBuild=false -bl:pointer-pack.binlog
if ($LASTEXITCODE -ne 0) { throw "GitHub.Cli pointer pack failed with exit code $LASTEXITCODE." }
if ($LASTEXITCODE -ne 0) { throw "gh.cli pointer pack failed with exit code $LASTEXITCODE." }
dotnet pack src/GitHub.Cli/GitHub.Cli.csproj -c $env:Configuration -r $rid $version -p:GeneratePackageOnBuild=false -bl:"pack-$rid.binlog"
if ($LASTEXITCODE -ne 0) { throw "GitHub.Cli $rid pack failed with exit code $LASTEXITCODE." }
if ($LASTEXITCODE -ne 0) { throw "gh.cli $rid pack failed with exit code $LASTEXITCODE." }
dotnet pack src/gh/gh.csproj -c $env:Configuration $version -p:GeneratePackageOnBuild=false -bl:pointer-pack-gh.binlog
if ($LASTEXITCODE -ne 0) { throw "gh pointer pack failed with exit code $LASTEXITCODE." }
dotnet pack src/gh/gh.csproj -c $env:Configuration -r $rid $version -p:GeneratePackageOnBuild=false -bl:"pack-gh-$rid.binlog"
Expand All @@ -66,9 +66,9 @@ jobs:
run: |
$ErrorActionPreference = 'Stop'
$script = Join-Path $pwd 'src/GitHub.Cli/unix-exec.ps1'
$cli = Get-ChildItem bin -Filter "GitHub.Cli.${{ matrix.rid }}.*.nupkg" | Where-Object Name -notlike '*.symbols.*' | Select-Object -First 1
$cli = Get-ChildItem bin -Filter "gh.cli.${{ matrix.rid }}.*.nupkg" | Where-Object Name -notlike '*.symbols.*' | Select-Object -First 1
$tool = Get-ChildItem bin -Filter "gh.${{ matrix.rid }}.*.nupkg" | Where-Object Name -notlike '*.symbols.*' | Select-Object -First 1
if (-not $cli) { throw "GitHub.Cli.${{ matrix.rid }} nupkg not found" }
if (-not $cli) { throw "gh.cli.${{ matrix.rid }} nupkg not found" }
if (-not $tool) { throw "gh.${{ matrix.rid }} nupkg not found" }
foreach ($pkg in @($cli, $tool)) {
& pwsh -NoProfile -File $script -Nupkg $pkg.FullName -Assert
Expand All @@ -80,9 +80,9 @@ jobs:
with:
name: package-${{ matrix.rid }}
# Only RID nupkgs. Pointer nupkgs are produced on every OS; merging them
# into one GitHub.Cli.{version}.nupkg corrupts the zip (NUGET 400 / sleet EOCD).
# into one gh.cli.{version}.nupkg corrupts the zip (NUGET 400 / sleet EOCD).
path: |
bin/GitHub.Cli.${{ matrix.rid }}.*.nupkg
bin/gh.cli.${{ matrix.rid }}.*.nupkg
bin/gh.${{ matrix.rid }}.*.nupkg
retention-days: 30
if-no-files-found: error
Expand All @@ -93,7 +93,7 @@ jobs:
with:
name: package-pointer
path: |
bin/GitHub.Cli.${{ env.Version }}.nupkg
bin/gh.cli.${{ env.Version }}.nupkg
bin/gh.${{ env.Version }}.nupkg
retention-days: 30
if-no-files-found: error
Expand Down Expand Up @@ -157,12 +157,12 @@ jobs:
}
$names = Get-ChildItem -File -Filter *.nupkg | ForEach-Object Name
foreach ($need in @(
"GitHub.Cli.$env:Version.nupkg",
"GitHub.Cli.win-x64.$env:Version.nupkg",
"GitHub.Cli.linux-x64.$env:Version.nupkg",
"GitHub.Cli.linux-arm64.$env:Version.nupkg",
"GitHub.Cli.osx-x64.$env:Version.nupkg",
"GitHub.Cli.osx-arm64.$env:Version.nupkg",
"gh.cli.$env:Version.nupkg",
"gh.cli.win-x64.$env:Version.nupkg",
"gh.cli.linux-x64.$env:Version.nupkg",
"gh.cli.linux-arm64.$env:Version.nupkg",
"gh.cli.osx-x64.$env:Version.nupkg",
"gh.cli.osx-arm64.$env:Version.nupkg",
"gh.$env:Version.nupkg",
"gh.win-x64.$env:Version.nupkg",
"gh.linux-x64.$env:Version.nupkg",
Expand Down
4 changes: 2 additions & 2 deletions CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ NuGet pointer and per-RID payloads that put a working GitHub CLI next to a .NET
## Language

**Pointer**:
The `GitHub.Cli` nupkg: `Cli` plus `runtime.json` mapping each supported RID to a RID package.
The `gh.cli` nupkg: `Cli` plus `runtime.json` mapping each supported RID to a RID package.
_Avoid_: metapackage, tool package, native package

**RID package**:
`GitHub.Cli.{rid}` — one nupkg, one RID, one Payload.
`gh.cli.{rid}` — one nupkg, one RID, one Payload.
_Avoid_: native package, runtime pack, sidecar package

**Payload**:
Expand Down
2 changes: 1 addition & 1 deletion docs/adr/0002-nupkg-version-is-upstream.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Nupkg version is Upstream

`GitHub.Cli` and the `gh` tool use the GitHub CLI version (`2.98.0`) so `ndnx gh@2.98.0` is that CLI. The pin is `github-cli.version`. CI dogfood stays `42.42.*`. Packaging-only republishes of the same CLI use a SemVer label, not a different major.
`gh.cli` and the `gh` tool use the GitHub CLI version (`2.98.0`) so `ndnx gh@2.98.0` is that CLI. The pin is `github-cli.version`. CI dogfood stays `42.42.*`. Packaging-only republishes of the same CLI use a SemVer label, not a different major.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dotnet tool install gh && dotnet gh --version

`dnx`/`ndnx` use the package id `gh`. An installed tool is `dotnet gh` (`ToolCommandName` `dotnet-gh`) so it does not replace GitHub's native `gh` on PATH.

`PackageReference` `GitHub.Cli` and pack/publish for your RID to copy `gh/` next to the app. `GitHub.Cli.ResolvePath()` is the Payload `gh` executable.
`PackageReference` `gh.cli` and pack/publish for your RID to copy `gh/` next to the app. `GitHub.Cli.ResolvePath()` is the Payload `gh` executable.

<!-- #content -->
---
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub.Cli/Cli.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static string ResolvePath(string? baseDirectory = null)
if (!File.Exists(path))
{
throw new FileNotFoundException(
$"GitHub CLI payload was not found at '{path}'. PackageReference GitHub.Cli and publish/pack for your RID.",
$"GitHub CLI payload was not found at '{path}'. PackageReference gh.cli and publish/pack for your RID.",
path);
}

Expand Down
8 changes: 4 additions & 4 deletions src/GitHub.Cli/GitHub.Cli.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<PackageId>GitHub.Cli</PackageId>
<PackageId>gh.cli</PackageId>
<RootNamespace>GitHub</RootNamespace>
<AssemblyName>GitHub.Cli</AssemblyName>
<Description>GitHub CLI payload for .NET: PackageReference GitHub.Cli and publish/pack for your RID to get gh/ plus GitHub.Cli.ResolvePath.</Description>
<Description>GitHub CLI payload for .NET: PackageReference gh.cli and publish/pack for your RID to get gh/ plus GitHub.Cli.ResolvePath.</Description>
<IsAotCompatible>true</IsAotCompatible>
<IsPackable>true</IsPackable>
<RuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
Expand Down Expand Up @@ -33,7 +33,7 @@
<Import Project="buildTransitive\GitHub.Cli.targets" Condition="'$(GitHubCliTargetsImported)' != 'true'" />

<ItemGroup>
<None Include="buildTransitive\GitHub.Cli.targets" Pack="$(IncludeBuildOutput)" PackagePath="buildTransitive\GitHub.Cli.targets" />
<None Include="build\GitHub.Cli.targets" Pack="$(IncludeBuildOutput)" PackagePath="build\GitHub.Cli.targets" />
<None Include="buildTransitive\GitHub.Cli.targets" Pack="$(IncludeBuildOutput)" PackagePath="buildTransitive\gh.cli.targets" />
<None Include="build\GitHub.Cli.targets" Pack="$(IncludeBuildOutput)" PackagePath="build\gh.cli.targets" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/GitHub.Cli/GitHub.Cli.pack.targets
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<ItemGroup>
<_GitHubCliRid Include="$(RuntimeIdentifiers)" />
</ItemGroup>
<Error Condition="'@(_GitHubCliRid)' == ''" Text="GitHub.Cli pointer pack requires RuntimeIdentifiers so runtime.json can map RID packages." />
<Error Condition="'@(_GitHubCliRid)' == ''" Text="gh.cli pointer pack requires RuntimeIdentifiers so runtime.json can map RID packages." />
<Error Condition="'$(PkgJsonPoke)' == '' or !Exists('$(PkgJsonPoke)\build\JsonPoke.dll')" Text="JsonPoke was not restored; cannot write runtime.json." />
<MakeDir Directories="$([System.IO.Path]::GetDirectoryName($(_GitHubCliRuntimeJson)))" />
<WriteLinesToFile File="$(_GitHubCliRuntimeJson)" Lines="{&quot;runtimes&quot;:{}}" Overwrite="true" />
Expand Down Expand Up @@ -69,7 +69,7 @@
</Target>

<Target Name="PackGitHubCliPayload" DependsOnTargets="RestoreGitHubCliPayload" Condition="'$(RuntimeIdentifier)' != ''" Returns="@(TfmSpecificPackageFile)">
<Error Condition="!Exists('$(GitHubCliPayloadRoot)')" Text="GitHub.Cli RID pack requires a Payload at $(GitHubCliPayloadRoot)." />
<Error Condition="!Exists('$(GitHubCliPayloadRoot)')" Text="gh.cli RID pack requires a Payload at $(GitHubCliPayloadRoot)." />
<ItemGroup>
<TfmSpecificPackageFile Include="$(GitHubCliPayloadRoot)\**\*" Exclude="$(GitHubCliPayloadRoot)\.payload">
<PackagePath>gh/%(RecursiveDir)%(Filename)%(Extension)</PackagePath>
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub.Cli/build/GitHub.Cli.targets
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)..\buildTransitive\GitHub.Cli.targets" Condition="'$(GitHubCliTargetsImported)' != 'true'" />
<Import Project="$(MSBuildThisFileDirectory)..\buildTransitive\$(MSBuildThisFileName).targets" Condition="'$(GitHubCliTargetsImported)' != 'true'" />
</Project>
4 changes: 2 additions & 2 deletions src/GitHub.Cli/buildTransitive/GitHub.Cli.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<PropertyGroup Condition="'$(GitHubCliPayloadRoot)' == ''">
<_GitHubCliVersion>$([System.IO.Path]::GetFileName($([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..'))))</_GitHubCliVersion>
<_GitHubCliPackageFolder>$([System.String]::Copy('github.cli.$(_GitHubCliRid)').ToLowerInvariant())</_GitHubCliPackageFolder>
<_GitHubCliPackageFolder>$([System.String]::Copy('gh.cli.$(_GitHubCliRid)').ToLowerInvariant())</_GitHubCliPackageFolder>
<GitHubCliPayloadRoot>$(NuGetPackageRoot)$(_GitHubCliPackageFolder)\$(_GitHubCliVersion)\gh</GitHubCliPayloadRoot>
</PropertyGroup>

Expand All @@ -23,7 +23,7 @@
Condition="'$(GitHubCliPayloadRoot)' != ''">
<Error
Condition="'$(RuntimeIdentifier)' != '' and !Exists('$(GitHubCliPayloadRoot)')"
Text="GitHub.Cli payload not found at '$(GitHubCliPayloadRoot)'. Pack GitHub.Cli -r $(RuntimeIdentifier) first and restore from $(PackageOutputPath)." />
Text="gh.cli payload not found at '$(GitHubCliPayloadRoot)'. Pack gh.cli -r $(RuntimeIdentifier) first and restore from $(PackageOutputPath)." />
<ItemGroup Condition="Exists('$(GitHubCliPayloadRoot)')">
<_GitHubCliPayloadFiles Include="$(GitHubCliPayloadRoot)\**\*" />
<ContentWithTargetPath Include="@(_GitHubCliPayloadFiles)">
Expand Down
1 change: 1 addition & 0 deletions src/Tests/CliTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public void ResolvePath_throws_when_missing()
{
var ex = Assert.Throws<FileNotFoundException>(() => GitHub.Cli.ResolvePath(root));
Assert.Contains("gh", ex.FileName, StringComparison.OrdinalIgnoreCase);
Assert.Contains("gh.cli", ex.Message, StringComparison.Ordinal);
}
finally
{
Expand Down
34 changes: 24 additions & 10 deletions src/Tests/PackTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ public void Pointer_and_rid_csproj_use_pack_split()
Assert.Contains("src/gh/gh.csproj", slnx);

var githubCli = File.ReadAllText(Path.Combine(repo, "src", "GitHub.Cli", "GitHub.Cli.csproj"));
Assert.Contains("<PackageId>GitHub.Cli</PackageId>", githubCli);
Assert.Contains("<PackageId>gh.cli</PackageId>", githubCli);
Assert.Contains("<RootNamespace>GitHub</RootNamespace>", githubCli);
Assert.Contains("PackageReference gh.cli", githubCli);
Assert.Contains("GitHub.Cli.ResolvePath", githubCli);
Assert.Contains("<RuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>", githubCli);
Assert.DoesNotContain("NuGetizer", githubCli, StringComparison.OrdinalIgnoreCase);
Assert.DoesNotContain("<PackAsTool", githubCli);
Assert.Contains("GitHub.Cli.pack.targets", githubCli);
Assert.Contains("buildTransitive\\GitHub.Cli.targets", githubCli.Replace('/', '\\'));
Assert.Contains("PackagePath=\"buildTransitive\\gh.cli.targets\"", githubCli.Replace('/', '\\'));
Assert.Contains("PackagePath=\"build\\gh.cli.targets\"", githubCli.Replace('/', '\\'));
Assert.Contains("Readme", githubCli);
Assert.DoesNotContain("win-arm64", githubCli);

Expand Down Expand Up @@ -69,6 +72,10 @@ public void Pointer_and_rid_csproj_use_pack_split()

var consumer = File.ReadAllText(Path.Combine(repo, "src", "GitHub.Cli", "buildTransitive", "GitHub.Cli.targets"));
Assert.Contains("IncludeGitHubCliPayload", consumer);
Assert.Contains("gh.cli.$(_GitHubCliRid)", consumer);
Assert.DoesNotContain("github.cli.", consumer);
var buildWrapper = File.ReadAllText(Path.Combine(repo, "src", "GitHub.Cli", "build", "GitHub.Cli.targets"));
Assert.Contains("$(MSBuildThisFileName).targets", buildWrapper);
Assert.Contains(@"TargetPath>gh\", consumer.Replace('/', '\\'));
Assert.DoesNotContain("runtimes/$(RuntimeIdentifier)/native/", consumer);

Expand All @@ -79,13 +86,14 @@ public void Pointer_and_rid_csproj_use_pack_split()
Assert.Contains("<ToolCommandName>dotnet-gh</ToolCommandName>", tool);
Assert.Contains("<AssemblyName>dotnet-gh</AssemblyName>", tool);
Assert.Contains("<ToolPackageRuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64;osx-arm64</ToolPackageRuntimeIdentifiers>", tool);
Assert.Contains("""<PackageReference Include="GitHub.Cli" Version="$(Version)" />""", tool);
Assert.Contains("""<PackageReference Include="gh.cli" Version="$(Version)" />""", tool);
Assert.DoesNotContain("NuGetizer", tool, StringComparison.OrdinalIgnoreCase);
Assert.Contains("Readme", tool);
var nuget = File.ReadAllText(Path.Combine(repo, "src", "gh", "nuget.config"));
Assert.Contains("key=\"local\"", nuget);
Assert.Contains("../../bin", nuget);
Assert.Contains("GitHub.Cli", nuget);
Assert.Contains("package pattern=\"gh.cli\"", nuget);
Assert.Contains("package pattern=\"gh.cli.*\"", nuget);
Assert.Contains("package pattern=\"gh\"", nuget);
Assert.DoesNotContain("win-arm64", tool);
Assert.DoesNotContain("gh.$(RuntimeIdentifier)", tool);
Expand Down Expand Up @@ -139,8 +147,8 @@ public void WriteGitHubCliRuntimeJson_maps_five_rids()
{
var range = runtimes
.GetProperty(rid)
.GetProperty("GitHub.Cli")
.GetProperty("GitHub.Cli." + rid)
.GetProperty("gh.cli")
.GetProperty("gh.cli." + rid)
.GetString();
Assert.False(string.IsNullOrWhiteSpace(range));
Assert.StartsWith("[", range);
Expand All @@ -157,7 +165,7 @@ public void Packed_nupkgs_have_pointer_and_rid_layout()
if (!Directory.Exists(bin))
return;

var nupkgs = Directory.GetFiles(bin, "GitHub.Cli*.nupkg")
var nupkgs = Directory.GetFiles(bin, "gh.cli*.nupkg")
.Where(f => !f.Contains(".symbols.", StringComparison.OrdinalIgnoreCase))
.ToArray();
if (nupkgs.Length == 0)
Expand All @@ -170,7 +178,8 @@ public void Packed_nupkgs_have_pointer_and_rid_layout()
var names = ZipNames(pointer);
Assert.Contains(names, n => n == "runtime.json" || n == "runtime.json/");
Assert.Contains(names, n => n.Replace('\\', '/').StartsWith("lib/", StringComparison.Ordinal));
Assert.Contains(names, n => n.Replace('\\', '/').Contains("buildTransitive/GitHub.Cli.targets", StringComparison.Ordinal));
Assert.Contains(names, n => n.Replace('\\', '/').Contains("buildTransitive/gh.cli.targets", StringComparison.Ordinal));
Assert.Contains(names, n => n.Replace('\\', '/').Contains("build/gh.cli.targets", StringComparison.Ordinal));
Assert.DoesNotContain(names, n => n.Replace('\\', '/').StartsWith("gh/", StringComparison.Ordinal));
}

Expand All @@ -188,9 +197,14 @@ public void Packed_nupkgs_have_pointer_and_rid_layout()
}

foreach (var toolRid in Directory.GetFiles(bin, "gh.*.nupkg")
.Where(f => !f.Contains(".symbols.", StringComparison.OrdinalIgnoreCase)
&& SupportedRids.Any(r => Path.GetFileName(f).Contains("." + r + ".", StringComparison.Ordinal)
&& !Path.GetFileName(f).Contains(".win-", StringComparison.Ordinal))))
.Where(f =>
{
var name = Path.GetFileName(f);
return !name.Contains(".symbols.", StringComparison.OrdinalIgnoreCase)
&& !name.StartsWith("gh.cli.", StringComparison.OrdinalIgnoreCase)
&& SupportedRids.Any(r => name.Contains("." + r + ".", StringComparison.Ordinal)
&& !name.Contains(".win-", StringComparison.Ordinal));
}))
{
AssertUnixExecuteBits(toolRid);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/ReleaseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void Publish_version_does_not_double_append_preview()
Assert.DoesNotContain("Expand-Archive", publish);
Assert.DoesNotContain("tar -xf $nupkg", publish);
Assert.Contains("package-pointer", publish);
Assert.Contains("bin/GitHub.Cli.${{ matrix.rid }}.*.nupkg", publish);
Assert.Contains("bin/gh.cli.${{ matrix.rid }}.*.nupkg", publish);
Assert.DoesNotContain("python3-pip", publish);
Assert.DoesNotContain("apt-get install -y python3-pip", publish);
}
Expand Down
4 changes: 2 additions & 2 deletions src/gh/gh.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
<!--
Pointer (`dotnet pack`): DotnetTool v2 settings listing gh.{rid}.
ToolCommandName is dotnet-gh so an installed tool is `dotnet gh`, not `gh`.
RID (`dotnet pack -r`): AOT tool plus the GitHub.Cli Payload.
RID (`dotnet pack -r`): AOT tool plus the gh.cli Payload.
Do not suffix PackageId here; the SDK appends $(RuntimeIdentifier) for DotnetToolRidPackage.
-->

<ItemGroup>
<PackageReference Include="GitHub.Cli" Version="$(Version)" />
<PackageReference Include="gh.cli" Version="$(Version)" />
<PackageReference Include="Readme" Version="1.2.1" PrivateAssets="all" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/gh/nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<package pattern="*" />
</packageSource>
<packageSource key="local">
<package pattern="GitHub.Cli" />
<package pattern="GitHub.Cli.*" />
<package pattern="gh.cli" />
<package pattern="gh.cli.*" />
<package pattern="gh" />
<package pattern="gh.*" />
</packageSource>
Expand Down
Loading