Skip to content

Commit

Permalink
civerifyversions: add support for custom registries
Browse files Browse the repository at this point in the history
  • Loading branch information
autoantwort committed Jul 2, 2021
1 parent 22209f9 commit c16ad2e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/vcpkg/commands.civerifyversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ namespace vcpkg::Commands::CIVerifyVersions
const std::string& local_git_tree,
bool verify_git_trees)
{
auto maybe_versions = vcpkg::get_builtin_versions(paths, port_name);
auto maybe_versions =
vcpkg::get_versions(paths.get_filesystem(), paths.current_versions_directory(), port_name);
if (!maybe_versions.has_value())
{
return {
Expand Down Expand Up @@ -92,7 +93,7 @@ namespace vcpkg::Commands::CIVerifyVersions
for (const std::string& control_file : {"CONTROL", "vcpkg.json"})
{
auto treeish = Strings::concat(version_entry.second, ':', control_file);
auto maybe_file = paths.git_show(Strings::concat(treeish), paths.root / vcpkg::u8path(".git"));
auto maybe_file = paths.git_show(Strings::concat(treeish), paths.current_git_directory());
if (!maybe_file.has_value()) continue;

const auto& file = maybe_file.value_or_exit(VCPKG_LINE_INFO);
Expand Down Expand Up @@ -301,18 +302,18 @@ namespace vcpkg::Commands::CIVerifyVersions
exclusion_set.insert(exclusions.begin(), exclusions.end());
}

auto maybe_port_git_tree_map = paths.git_get_local_port_treeish_map();
auto maybe_port_git_tree_map = paths.git_get_port_treeish_map(paths.current_ports_directory());
Checks::check_exit(VCPKG_LINE_INFO,
maybe_port_git_tree_map.has_value(),
"Fatal error: Failed to obtain git SHAs for local ports.\n%s",
maybe_port_git_tree_map.error());
auto port_git_tree_map = maybe_port_git_tree_map.value_or_exit(VCPKG_LINE_INFO);

// Baseline is required.
auto baseline = get_builtin_baseline(paths).value_or_exit(VCPKG_LINE_INFO);
auto baseline = get_baseline(paths, paths.current_registry_root).value_or_exit(VCPKG_LINE_INFO);
auto& fs = paths.get_filesystem();
std::set<std::string> errors;
for (const auto& dir : stdfs::directory_iterator(paths.builtin_ports_directory()))
for (const auto& dir : stdfs::directory_iterator(paths.current_ports_directory()))
{
const auto& port_path = dir.path();

Expand Down

0 comments on commit c16ad2e

Please sign in to comment.