diff options
| author | ras0219 <533828+ras0219@users.noreply.github.com> | 2020-08-31 22:37:10 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-31 22:37:10 -0700 |
| commit | a0536798eeb0786a4a27078c1b797ab7b6c41dd1 (patch) | |
| tree | af7c5e848fd7dc37199e5a287033431f76931f5c /toolsrc/include | |
| parent | 46e25a10d7295d3bc107d6f51ce0e2851877f393 (diff) | |
| download | vcpkg-a0536798eeb0786a4a27078c1b797ab7b6c41dd1.tar.gz vcpkg-a0536798eeb0786a4a27078c1b797ab7b6c41dd1.zip | |
[vcpkg] Implement 'repository' tag for NuGet binary caching (#13228)
This tag is required to correctly interface with GitHub Packages, because GHP shares a single remote for the entire organization and uses the repository field to associate a package with a particular repository.
This tag will be automatically generated if the default GitHub Actions environment variables are present (GITHUB_XYZ) or if the user defines VCPKG_NUGET_REPOSITORY.
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/binarycaching.private.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/toolsrc/include/vcpkg/binarycaching.private.h b/toolsrc/include/vcpkg/binarycaching.private.h index 1b5d587de..46d9d6741 100644 --- a/toolsrc/include/vcpkg/binarycaching.private.h +++ b/toolsrc/include/vcpkg/binarycaching.private.h @@ -31,9 +31,22 @@ namespace vcpkg std::string nupkg_filename() const { return Strings::concat(id, '.', version, ".nupkg"); } }; + namespace details + { + struct NuGetRepoInfo + { + std::string repo; + std::string branch; + std::string commit; + }; + + NuGetRepoInfo get_nuget_repo_info_from_env(); + } + std::string generate_nuspec(const VcpkgPaths& paths, const Dependencies::InstallPlanAction& action, - const NugetReference& ref); + const NugetReference& ref, + details::NuGetRepoInfo rinfo = details::get_nuget_repo_info_from_env()); struct XmlSerializer { |
