aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-08-08 04:16:15 -0700
committerRobert Schumacher <roschuma@microsoft.com>2018-08-08 04:16:15 -0700
commit0a2564482197ec5bf6495c705d5e93265af55e4a (patch)
treea3cbf1bfdbd16e7144ae53dbfe0b9140c3375dcf /docs
parentcc00cf05fb70ddec3197ca0ee7cbd47cc1c8ccfe (diff)
downloadvcpkg-0a2564482197ec5bf6495c705d5e93265af55e4a.tar.gz
vcpkg-0a2564482197ec5bf6495c705d5e93265af55e4a.zip
[docs] Add docs for vcpkg_from_gitlab()
Diffstat (limited to 'docs')
-rw-r--r--docs/maintainers/portfile-functions.md1
-rw-r--r--docs/maintainers/vcpkg_from_gitlab.md55
2 files changed, 56 insertions, 0 deletions
diff --git a/docs/maintainers/portfile-functions.md b/docs/maintainers/portfile-functions.md
index 6a05d884d..f9476d3a7 100644
--- a/docs/maintainers/portfile-functions.md
+++ b/docs/maintainers/portfile-functions.md
@@ -15,5 +15,6 @@
- [vcpkg\_find\_acquire\_program](vcpkg_find_acquire_program.md)
- [vcpkg\_from\_bitbucket](vcpkg_from_bitbucket.md)
- [vcpkg\_from\_github](vcpkg_from_github.md)
+- [vcpkg\_from\_gitlab](vcpkg_from_gitlab.md)
- [vcpkg\_install\_cmake](vcpkg_install_cmake.md)
- [vcpkg\_install\_msbuild](vcpkg_install_msbuild.md)
diff --git a/docs/maintainers/vcpkg_from_gitlab.md b/docs/maintainers/vcpkg_from_gitlab.md
new file mode 100644
index 000000000..697e32f44
--- /dev/null
+++ b/docs/maintainers/vcpkg_from_gitlab.md
@@ -0,0 +1,55 @@
+# vcpkg_from_gitlab
+
+Download and extract a project from Gitlab instances. Enables support for `install --head`.
+
+## Usage:
+```cmake
+vcpkg_from_gitlab(
+ GITLAB_INSTANCE <https://gitlab.com>
+ OUT_SOURCE_PATH <SOURCE_PATH>
+ REPO <gitlab-org/gitlab-ce>
+ [REF <v10.7.3>]
+ [SHA512 <45d0d7f8cc350...>]
+ [HEAD_REF <master>]
+)
+```
+
+## Parameters:
+
+### GITLAB_URL
+The URL of the Gitlab instance to use.
+
+### OUT_SOURCE_PATH
+Specifies the out-variable that will contain the extracted location.
+
+This should be set to `SOURCE_PATH` by convention.
+
+### REPO
+The organization or user plus the repository name on the Gitlab instance.
+
+### REF
+A stable git commit-ish (ideally a tag) that will not change contents. **This should not be a branch.**
+
+For repositories without official releases, this can be set to the full commit id of the current latest master.
+
+If `REF` is specified, `SHA512` must also be specified.
+
+### SHA512
+The SHA512 hash that should match the archive (${GITLAB_URL}/${REPO}/-/archive/${REF}/${REPO_NAME}-${REF}.tar.gz).
+The REPO_NAME variable is parsed from the value of REPO.
+
+This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile.
+
+### HEAD_REF
+The unstable git commit-ish (ideally a branch) to pull for `--head` builds.
+
+For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms.
+
+## Notes:
+At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present.
+
+This exports the `VCPKG_HEAD_VERSION` variable during head builds.
+
+
+## Source
+[scripts/cmake/vcpkg_from_gitlab.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_gitlab.cmake)