Skip to content

Commit

Permalink
Set PackageProjectUrl to RepositoryUrl from source control info
Browse files Browse the repository at this point in the history
If SourceLink is used, the RepositoryUrl will be initialized from the PrivateRepositoryUrl (as long as PublishRepositoryUrl=true). This URL should also be the default for PackageProjectUrl since it's quite common for OSS projects to not have a separate site.

Fixes #91
  • Loading branch information
kzu committed May 10, 2021
1 parent a8fd452 commit b449eac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/NuGetizer.Tasks/NuGetizer.Shared.targets
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<PropertyGroup Condition="'$(SourceControlInformationFeatureSupported)' == 'true'">
<!-- The project must specify PublishRepositoryUrl=true in order to publish the URL, in order to prevent inadvertent leak of internal URL. -->
<RepositoryUrl Condition="'$(RepositoryUrl)' == '' and '$(PublishRepositoryUrl)' == 'true'">$(PrivateRepositoryUrl)</RepositoryUrl>
<PackageProjectUrl Condition="'$(PackageProjectUrl)' == '' and '$(PublishRepositoryUrl)' == 'true'">$(RepositoryUrl)</PackageProjectUrl>
</PropertyGroup>

<PropertyGroup Condition="'$(SourceRevisionId)' != ''">
Expand Down

0 comments on commit b449eac

Please sign in to comment.