Skip to content

Commit

Permalink
Update Bitbucket doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tmat committed May 23, 2019
1 parent b2e4abe commit f36acc4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Expand Up @@ -92,27 +92,27 @@ For projects hosted by [GitLab](https://gitlab.com) reference [Microsoft.SourceL

### Bitbucket.org

For projects hosted on [Bitbucket.org](https://bitbucket.org) in git repositories reference [Microsoft.SourceLink.Bitbucket.Git](https://www.nuget.org/packages/Microsoft.SourceLink.Bitbucket.Git) package:
For projects in git repositories hosted on [Bitbucket.org](https://bitbucket.org) or for self-hosted Bitbucket projects reference [Microsoft.SourceLink.Bitbucket.Git](https://www.nuget.org/packages/Microsoft.SourceLink.Bitbucket.Git) package:

```xml
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.Bitbucket.Git" Version="1.0.0-beta2-19270-01" PrivateAssets="All"/>
</ItemGroup>
```

For self-hosted Bitbucket projects reference [Microsoft.SourceLink.Bitbucket.Git](https://www.nuget.org/packages/Microsoft.SourceLink.Bitbucket.Git) package and add Bitbucket host configuration.
Additional configuration is available when SourceLinkBitbucketGitHost is added to csproj:

- EnterpriseEdition - flag whether it is Enterprise Edition or Cloud Edition, by default it is true.
- Version="4.7" - for Enterprise Edition provides its version. URL format for accessing files is different for Bitbucket in version < 4.7, please add Bitbucket version if it is the case
If your self-hosted Bitbucket server is an Enterprise Edition older than version 4.7, or is a Cloud Edition you must specify `SourceLinkBitbucketGitHost` item group in addition to the package reference:

```xml
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.Bitbucket.Git" Version="1.0.0-beta2-18618-05" PrivateAssets="All"/>
<SourceLinkBitbucketGitHost Include="bitbucket.yourdomain.com" EnterpriseEdition="true" Version="4.7"/>
<SourceLinkBitbucketGitHost Include="bitbucket.yourdomain.com" EnterpriseEdition="true" Version="4.5"/>
</ItemGroup>
```

The item group `SourceLinkBitbucketGitHost` specifies the domain of the Bitbucket host, whether it runs Enterprise Edition and which version:

- `EnterpriseEdition` - Set to `true` if the host runs Enterprise Edition (default), set to `false` for Cloud Edition.
- `Version` - set to the version of the Enterprise Edition (not required for Cloud Edition). URL format for accessing files is different for Bitbucket Enterprise version < 4.7. By default SourceLink assumes new format (version 4.7+).

### Multiple providers, repositories with submodules

If your repository contains submodules hosted by other git providers reference packages of all these providers. For example, projects in a repository hosted by Azure DevOps that links a GitHub repository via a submodule should reference both [Microsoft.SourceLink.Vsts.Git](https://www.nuget.org/packages/Microsoft.SourceLink.Vsts.Git) and [Microsoft.SourceLink.GitHub](https://www.nuget.org/packages/Microsoft.SourceLink.GitHub) packages. [Additional configuration](https://github.com/dotnet/sourcelink/blob/master/docs/README.md#configuring-projects-with-multiple-sourcelink-providers) might be needed if multiple Source Link packages are used in the project.
Expand Down

0 comments on commit f36acc4

Please sign in to comment.