Skip to content

Commit

Permalink
Update Readme (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmat committed Sep 23, 2021
1 parent fd48bde commit 496d52c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Expand Up @@ -93,6 +93,19 @@ For projects hosted by [GitLab](https://gitlab.com) reference [Microsoft.SourceL
</ItemGroup>
```

If your project is hosted by GitLab older than version 12.0 you must specify `SourceLinkGitLabHost` item group in addition to the package reference:

```xml
<ItemGroup>
<SourceLinkGitLabHost Include="gitlab.yourdomain.com" Version="11.0"/>
</ItemGroup>
```

The item group `SourceLinkGitLabHost` specifies the domain of the GitLab host and the version of GitLab.
The version is important since URL format for accessing files changes with version 12.0. By default Source Link assumes new format (version 12.0+).

You might also consider using environment variable [`CI_SERVER_VERSION`](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html) (`Version="$(CI_SERVER_VERSION)"`) if available in your build environment.

### Bitbucket

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:
Expand Down

0 comments on commit 496d52c

Please sign in to comment.