Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What are the extensibility points of these targets? #188

Closed
paulomorgado opened this issue Oct 7, 2018 · 6 comments
Closed

What are the extensibility points of these targets? #188

paulomorgado opened this issue Oct 7, 2018 · 6 comments
Labels
question Further information is requested
Milestone

Comments

@paulomorgado
Copy link

I'd like to extend these targets and I'd like to know what can I rely on and what the extensibility points are.

@tmat
Copy link
Member

tmat commented Oct 8, 2018

Any target or property whose name does not start with _ is considered public API.
Note however that SourceLink packages are still pre-release and public API may change.

@tmat tmat added the question Further information is requested label Oct 8, 2018
@paulomorgado
Copy link
Author

Thanks, @tmat. I know these are still pre-release versions.

I'm trying to use the information collected by these targets to add them to the NuGet package information. For that, I need:

  • RepositoryUrl
  • RepositoryType
  • RepositoryBranch
  • RepositoryCommit

I guess that, apart from RepositoryBranch, all information is collected through these targets. But in which variables?

Shouldn't RepositoryBranch be available?

This NuGet blog post mentions these packages and links to the Pack target documentation which contains RepositoryBranch.

I'm also adding this information to assembly metadata and don't want to be collecting it again and risk being out of sync.

@tmat
Copy link
Member

tmat commented Oct 8, 2018

@paulomorgado
Copy link
Author

The .NET SDK would also fill the RepositoryBranch if it was available.

https://github.com/NuGet/NuGet.Client/blob/839df088f48e1e9d87ab86e5b26b7431547fa820/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.targets#L228

I think it's worth the effort. Don't you think? Can I help?

I'm also adding all this information to the assembly as AssemblyMetadataAttribute annotations.

And I'm fiddling with the repository URL and changing it to the commit URL. That way, on the NuGet site, the link goes directly to that commit.

@tmat tmat added this to the future milestone Oct 8, 2019
@tmat
Copy link
Member

tmat commented Nov 4, 2019

I'm gonna close this issue. If you think we should add support for RepositoryBranch let's open a separate issue for that.

@tmat tmat closed this as completed Nov 4, 2019
@mikeblakeuk
Copy link

Why doesn't RepositoryBranch get set?
Why do i need to add /p:RepositoryBranch=12345-branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants