Skip to content

Commit

Permalink
Document that RepositoryBranch is also controlled by PublishRepositor…
Browse files Browse the repository at this point in the history
…yUrl (#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.
  • Loading branch information
MattKotsenas committed Jul 31, 2024
1 parent 6994733 commit 744df35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ Note that it is possible and supported to reference multiple Source Link package

### PublishRepositoryUrl

The URL of the repository supplied by the CI server or retrieved from source control manager is stored in `PrivateRepositoryUrl` variable.
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
are not consumed directly. Instead, they are stored in the `PrivateRepositoryUrl` and `SourceBranchName` variables.

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

### EmbedAllSources

Expand Down

0 comments on commit 744df35

Please sign in to comment.