Skip to content

Commit 744df35

Browse files
authored
Document that RepositoryBranch is also controlled by PublishRepositoryUrl (#1252)
This is a follow up PR based on NuGet/NuGet.Client#5923. Update the README to specify that publishing `$(SourceBranchName)` into `$(RepositoryBranch)' is also controlled by the `$(PublishRepositoryUrl)` property.
1 parent 6994733 commit 744df35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ Note that it is possible and supported to reference multiple Source Link package
4343

4444
### PublishRepositoryUrl
4545

46-
The URL of the repository supplied by the CI server or retrieved from source control manager is stored in `PrivateRepositoryUrl` variable.
46+
To avoid inadvertently publishing private repository data, the URL and branch of the repository supplied by the CI server or retrieved from the source control manager
47+
are not consumed directly. Instead, they are stored in the `PrivateRepositoryUrl` and `SourceBranchName` variables.
4748

48-
This value is not directly embedded in build outputs to avoid inadvertently publishing links to private repositories.
49-
Instead, `PublishRepositoryUrl` needs to be set by the project in order to publish the URL into `RepositoryUrl` property,
50-
which is used e.g. in the nuspec file generated for NuGet package produced by the project.
49+
If `PublishRepositoryUrl` is set to `true` by the project, these properties are published into the `RepositoryUrl` and `RepositoryBranch` properties,
50+
which are used e.g. in the nuspec file generated for the NuGet package produced by the project.
5151

5252
### EmbedAllSources
5353

0 commit comments

Comments
 (0)