aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorras0219 <533828+ras0219@users.noreply.github.com>2020-12-01 12:00:00 -0800
committerGitHub <noreply@github.com>2020-12-01 12:00:00 -0800
commit4fba4b7911cc5946dad1c323836b8b9779dd158b (patch)
treee8fb05f42fa3b907e528e4c3bb73b6a29890ebcc /toolsrc/include
parent46e6bad823b02b2afd067b114fe52957dacc8af2 (diff)
downloadvcpkg-4fba4b7911cc5946dad1c323836b8b9779dd158b.tar.gz
vcpkg-4fba4b7911cc5946dad1c323836b8b9779dd158b.zip
[vcpkg] Expose alpha end-to-end versioning (#14852)
* Check for the 'versions' feature flag while installing a manifest * Implement two-level fallback for Baselines: * First, fall back to current repo's baseline.json * Second, fall back to the ports in ports/ * Optimize checking out baseline.json via `git show` * Detect presence of '$x-default-baseline' in the manifest and use that as the baseline commit (to be replaced by Federation functionality) * If port_versions/x-/xyz.json is not found, fall back to ports in ports/ Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/portfileprovider.h3
-rw-r--r--toolsrc/include/vcpkg/vcpkgpaths.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/toolsrc/include/vcpkg/portfileprovider.h b/toolsrc/include/vcpkg/portfileprovider.h
index 610ecb735..1ce934c9e 100644
--- a/toolsrc/include/vcpkg/portfileprovider.h
+++ b/toolsrc/include/vcpkg/portfileprovider.h
@@ -73,7 +73,8 @@ namespace vcpkg::PortFileProvider
struct BaselineProvider : IBaselineProvider, Util::ResourceBase
{
- explicit BaselineProvider(const vcpkg::VcpkgPaths& paths, const std::string& baseline);
+ explicit BaselineProvider(const vcpkg::VcpkgPaths& paths);
+ BaselineProvider(const vcpkg::VcpkgPaths& paths, const std::string& baseline);
~BaselineProvider();
Optional<VersionT> get_baseline_version(StringView port_name) const override;
diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h
index c85eff0ca..257ecf7bb 100644
--- a/toolsrc/include/vcpkg/vcpkgpaths.h
+++ b/toolsrc/include/vcpkg/vcpkgpaths.h
@@ -118,6 +118,7 @@ namespace vcpkg
// Git manipulation
fs::path git_checkout_baseline(Files::Filesystem& filesystem, StringView commit_sha) const;
fs::path git_checkout_port(Files::Filesystem& filesystem, StringView port_name, StringView git_tree) const;
+ ExpectedS<std::string> git_show(const std::string& treeish, const fs::path& dot_git_dir) const;
Optional<const Json::Object&> get_manifest() const;
Optional<const fs::path&> get_manifest_path() const;