More specific and unique feed name for NuGet install command template. (#23889)
The default command to setup a NuGet registry from the command line is: ``` dotnet nuget add source --name Gitea --username your_username --password your_token <gitea-origin-url/> ``` The feed name `Gitea` is hard-coded into the command template, so each registry will by default have the same feed name. I know templates can be overridden using the `custom` folder. But in my opinion, it's a good practice to make a slight change in the default template to make the feed name more context specific: ``` dotnet nuget add source --name {{.PackageDescriptor.Owner.Name}} --username your_username --password your_token <gitea-origin-url/> ```
This commit is contained in:
parent
d92909fa8b
commit
6e346f84c1
|
@ -4,11 +4,11 @@
|
|||
<div class="ui form">
|
||||
<div class="field">
|
||||
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.nuget.registry"}}</label>
|
||||
<div class="markup"><pre class="code-block"><code>dotnet nuget add source --name Gitea --username your_username --password your_token <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/nuget/index.json"></gitea-origin-url></code></pre></div>
|
||||
<div class="markup"><pre class="code-block"><code>dotnet nuget add source --name {{.PackageDescriptor.Owner.Name}} --username your_username --password your_token <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/nuget/index.json"></gitea-origin-url></code></pre></div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.nuget.install"}}</label>
|
||||
<div class="markup"><pre class="code-block"><code>dotnet add package --source Gitea --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}</code></pre></div>
|
||||
<div class="markup"><pre class="code-block"><code>dotnet add package --source {{.PackageDescriptor.Owner.Name}} --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}</code></pre></div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{.locale.Tr "packages.nuget.documentation" | Safe}}</label>
|
||||
|
|
Loading…
Reference in a new issue