forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Add docs for vcpkg_from_gitlab()
- Loading branch information
1 parent
cc00cf0
commit 0a25644
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |