Restore x-upload-metrics command accidentally disabled by removing VCPKG_DISABLE_METRICS (#15810)

* Restore x-upload-metrics command accidentally disabled by removing VCPKG_DISABLE_METRICS in https://github.com/microsoft/vcpkg/pull/15470

* Didn't save a file.
This commit is contained in:
Billy O'Neal 2021-01-22 11:10:27 -08:00 committed by GitHub
parent f0997d3f85
commit 925b64efd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -32,9 +32,9 @@ TEST_CASE ("get_available_basic_commands works", "[commands]")
check_all_commands(Commands::get_available_basic_commands(), {
"contact",
"version",
#if VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
#if defined(_WIN32)
"x-upload-metrics",
#endif // VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
#endif // defined(_WIN32)
});
}

View File

@ -41,16 +41,16 @@ namespace vcpkg::Commands
{
static const Version::VersionCommand version{};
static const Contact::ContactCommand contact{};
#if VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
#if defined(_WIN32)
static const UploadMetrics::UploadMetricsCommand upload_metrics{};
#endif // VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
#endif // defined(_WIN32)
static std::vector<PackageNameAndFunction<const BasicCommand*>> t = {
{"version", &version},
{"contact", &contact},
#if VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
#if defined(_WIN32)
{"x-upload-metrics", &upload_metrics},
#endif // VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
#endif // defined(_WIN32)
};
return t;
}

View File

@ -1,6 +1,6 @@
#include <vcpkg/commands.upload-metrics.h>
#if VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
#if defined(_WIN32)
#include <vcpkg/base/checks.h>
#include <vcpkg/base/files.h>
@ -26,4 +26,4 @@ namespace vcpkg::Commands::UploadMetrics
Checks::exit_success(VCPKG_LINE_INFO);
}
}
#endif // VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
#endif // defined(_WIN32)