From 496d52c4498aee4e69173a1cb10669f8a268be73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Matou=C5=A1ek?= Date: Thu, 23 Sep 2021 16:57:41 -0700 Subject: [PATCH] Update Readme (#736) --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 13d0163e..931e2fa9 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,19 @@ For projects hosted by [GitLab](https://gitlab.com) reference [Microsoft.SourceL ``` +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 + + + +``` + +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: