Skip to content

Commit 496d52c

Browse files
authored
Update Readme (#736)
1 parent fd48bde commit 496d52c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,19 @@ For projects hosted by [GitLab](https://gitlab.com) reference [Microsoft.SourceL
9393
</ItemGroup>
9494
```
9595

96+
If your project is hosted by GitLab older than version 12.0 you must specify `SourceLinkGitLabHost` item group in addition to the package reference:
97+
98+
```xml
99+
<ItemGroup>
100+
<SourceLinkGitLabHost Include="gitlab.yourdomain.com" Version="11.0"/>
101+
</ItemGroup>
102+
```
103+
104+
The item group `SourceLinkGitLabHost` specifies the domain of the GitLab host and the version of GitLab.
105+
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+).
106+
107+
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.
108+
96109
### Bitbucket
97110

98111
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:

0 commit comments

Comments
 (0)