PSResourceGet
PSResourceGet copied to clipboard
Make it possible to include repository url and type in generated nuspec file
Summary of the new feature / enhancement
It should be possible somehow in the Publish-PSResource cmdlet to have the repository
element with attributes type
and url
defined in the generated Nuspec file in order to link a package to a repository in GitHub during publishing of a package. Similar to how RepositoryUrl
is used when pushing a package with the dotnet cli and a csproj file.
As far as I can tell, this linking of a package to a repository must be done manually after publishing a package today.
References: https://docs.github.com/en/[email protected]/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry
https://devblogs.microsoft.com/nuget/introducing-source-code-link-for-nuget-packages/
Proposed technical implementation details (optional)
No response
@partlythomas we have the ProjectUri
element in the psd1 that usually links to a GitHub repo, is that what you are looking for, would you want this to connect to the repository
element in the nuspec? What are you looking for with the type
attribute?
https://learn.microsoft.com/en-us/nuget/reference/nuspec#repository
@partlythomas we have the
ProjectUri
element in the psd1 that usually links to a GitHub repo, is that what you are looking for, would you want this to connect to therepository
element in the nuspec? What are you looking for with thetype
attribute?https://learn.microsoft.com/en-us/nuget/reference/nuspec#repository
Good point, I missed that - Yes I want that to connect to the repository element - If it makes sense. The type
part was just mentioned as it is a required (?) specification of the element:
https://learn.microsoft.com/en-us/nuget/reference/nuspec#repository
The end goal is that I want a published module or script to automatically link to a repository when using GitHub Packages NuGet feed as the destination repository. I am not fully sure if linking the RepositoryUri
element to the nuspec repository
element would achieve that.
I was able to create recreate this,
- created nupkg using PSRresourceGet
- Unpackage it, add "repository" element in nuspec and pack it back to nupkg
- push it github registry It links the nupkg to respective github repo.
We can either reuse ProjectUri
in psd1 or have another parameter that accepts repo url. I would prefer reading ProjectUri field.