From 8e677dcbb4cfc0594eae73d530eb4b197243f744 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 24 Apr 2025 18:48:55 -0700 Subject: [PATCH 1/2] [vcpkg_from_github] Document USE_TARBALL_API. See https://github.com/microsoft/vcpkg/pull/44241 --- vcpkg/maintainers/functions/vcpkg_from_github.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/vcpkg/maintainers/functions/vcpkg_from_github.md b/vcpkg/maintainers/functions/vcpkg_from_github.md index dd3c6ad5..4f74d048 100644 --- a/vcpkg/maintainers/functions/vcpkg_from_github.md +++ b/vcpkg/maintainers/functions/vcpkg_from_github.md @@ -1,7 +1,7 @@ --- title: vcpkg_from_github description: Learn how to use vcpkg_from_github. -ms.date: 01/10/2024 +ms.date: 04/24/2025 --- # vcpkg_from_github @@ -22,6 +22,7 @@ vcpkg_from_github( [GITHUB_HOST ] [AUTHORIZATION_TOKEN <${SECRET_FROM_FILE}>] [FILE_DISAMBIGUATOR ] + [USE_TARBALL_API] ) ``` @@ -71,12 +72,18 @@ This field should contain the scheme, host, and port of the desired URL without ### AUTHORIZATION_TOKEN -A token to be passed via the Authorization HTTP header as "token ${AUTHORIZATION_TOKEN}". +A token to be passed via the Authorization HTTP header as "token ${AUTHORIZATION_TOKEN}". If `AUTHORIZATION_TOKEN` is a [fine-grained access token](https://docs.github.com/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#fine-grained-personal-access-tokens), you must also use [`USE_TARBALL_API`](#USE_TARBALL_API). ### FILE_DISAMBIGUATOR A token to uniquely identify the resulting filename if the SHA512 changes even though a git ref does not, to avoid stepping on the same file name. +### USE_TARBALL_API + +When specified, vcpkg will use the tarball API documented at [GitHub REST API](https://docs.github.com/rest/repos/contents?#download-a-repository-archive-tar) rather than the archive API to download sources. + +This option exists rather than being a globally controlled setting because the SHA512 of sources returned by the tarball API differs from the regular archives API. + ## Notes At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. From e8652e5dd98702930202b25faae5d25d7186d744 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 24 Apr 2025 19:10:26 -0700 Subject: [PATCH 2/2] Fix #use_tarball_api --- vcpkg/maintainers/functions/vcpkg_from_github.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg/maintainers/functions/vcpkg_from_github.md b/vcpkg/maintainers/functions/vcpkg_from_github.md index 4f74d048..3ee36987 100644 --- a/vcpkg/maintainers/functions/vcpkg_from_github.md +++ b/vcpkg/maintainers/functions/vcpkg_from_github.md @@ -72,7 +72,7 @@ This field should contain the scheme, host, and port of the desired URL without ### AUTHORIZATION_TOKEN -A token to be passed via the Authorization HTTP header as "token ${AUTHORIZATION_TOKEN}". If `AUTHORIZATION_TOKEN` is a [fine-grained access token](https://docs.github.com/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#fine-grained-personal-access-tokens), you must also use [`USE_TARBALL_API`](#USE_TARBALL_API). +A token to be passed via the Authorization HTTP header as "token ${AUTHORIZATION_TOKEN}". If `AUTHORIZATION_TOKEN` is a [fine-grained access token](https://docs.github.com/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#fine-grained-personal-access-tokens), you must also use [`USE_TARBALL_API`](#use_tarball_api). ### FILE_DISAMBIGUATOR