Skip to content

Commit

Permalink
Update Readme (#283)
Browse files Browse the repository at this point in the history
* Update Readme to 1.0.0-beta2-19270-01

* Update Bitbucket doc
  • Loading branch information
tmat authored May 24, 2019
1 parent 8144155 commit 8028d61
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ For projects hosted by [GitHub](http://github.com) or [GitHub Enterprise](https:

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

Expand All @@ -62,7 +62,7 @@ For projects hosted by [Azure DevOps](https://www.visualstudio.com/team-services

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

Expand All @@ -73,7 +73,7 @@ For projects hosted by on-prem [Team Foundation Server](https://visualstudio.mic

```xml
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.Tfs.Git" Version="1.0.0-beta2-18618-05" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.Tfs.Git" Version="1.0.0-beta2-19270-01" PrivateAssets="All"/>
<SourceLinkTfsGitHost Include="tfs-server-name" VirtualDirectory="tfs"/>
</ItemGroup>
```
Expand All @@ -86,33 +86,31 @@ For projects hosted by [GitLab](https://gitlab.com) reference [Microsoft.SourceL

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

### Bitbucket.org
### Bitbucket

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 hosted on an on-prem Bitbucket server 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-18618-05" PrivateAssets="All"/>
<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 project is hosted by Bitbucket Server or Bitbucket Data Center older than version 4.7 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" Version="4.5"/>
</ItemGroup>
```

The item group `SourceLinkBitbucketGitHost` specifies the domain of the Bitbucket host and the version of Bitbucket.
The version is important since URL format for accessing files changes with 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 All @@ -125,9 +123,9 @@ To add Source Link support to your native project add package references corresp

```xml
<packages>
<package id="Microsoft.Build.Tasks.Git" version="1.0.0-beta2-18618-05" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.0.0-beta2-18618-05" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.0.0-beta2-18618-05" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Build.Tasks.Git" version="1.0.0-beta2-19270-01" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.0.0-beta2-19270-01" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.0.0-beta2-19270-01" targetFramework="native" developmentDependency="true" />
</packages>
```

Expand Down

0 comments on commit 8028d61

Please sign in to comment.