From f54151fff6ce32b24ef18be0a55113132345c859 Mon Sep 17 00:00:00 2001 From: Sean Yen Date: Wed, 19 Jun 2019 16:25:21 -0700 Subject: [PATCH] make options to be experimental. --- toolsrc/src/vcpkg/export.chocolatey.cpp | 2 ++ toolsrc/src/vcpkg/export.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/toolsrc/src/vcpkg/export.chocolatey.cpp b/toolsrc/src/vcpkg/export.chocolatey.cpp index cf9db6f4cf..a433cc84b3 100644 --- a/toolsrc/src/vcpkg/export.chocolatey.cpp +++ b/toolsrc/src/vcpkg/export.chocolatey.cpp @@ -150,6 +150,8 @@ if (Test-Path $installedDir) const VcpkgPaths& paths, const Options& chocolatey_options) { + Checks::check_exit(VCPKG_LINE_INFO, chocolatey_options.maybe_maintainer.has_value(), "--x-maintainer option is required."); + Files::Filesystem& fs = paths.get_filesystem(); const fs::path vcpkg_root_path = paths.root; const fs::path raw_exported_dir_path = vcpkg_root_path / "chocolatey"; diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 06f4b1868e..6070661640 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -283,9 +283,9 @@ namespace vcpkg::Export static constexpr StringLiteral OPTION_IFW_REPOSITORY_DIR_PATH = "--ifw-repository-directory-path"; static constexpr StringLiteral OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; static constexpr StringLiteral OPTION_IFW_INSTALLER_FILE_PATH = "--ifw-installer-file-path"; - static constexpr StringLiteral OPTION_CHOCOLATEY = "--chocolatey"; - static constexpr StringLiteral OPTION_CHOCOLATEY_MAINTAINER = "--maintainer"; - static constexpr StringLiteral OPTION_CHOCOLATEY_VERSION_SUFFIX = "--version-suffix"; + static constexpr StringLiteral OPTION_CHOCOLATEY = "--x-chocolatey"; + static constexpr StringLiteral OPTION_CHOCOLATEY_MAINTAINER = "--x-maintainer"; + static constexpr StringLiteral OPTION_CHOCOLATEY_VERSION_SUFFIX = "--x-version-suffix"; static constexpr std::array EXPORT_SWITCHES = {{ {OPTION_DRY_RUN, "Do not actually export"}, @@ -294,7 +294,7 @@ namespace vcpkg::Export {OPTION_IFW, "Export to an IFW-based installer"}, {OPTION_ZIP, "Export to a zip file"}, {OPTION_SEVEN_ZIP, "Export to a 7zip (.7z) file"}, - {OPTION_CHOCOLATEY, "Export a Chocolatey package"}, + {OPTION_CHOCOLATEY, "Export a Chocolatey package (experimental feature)"}, }}; static constexpr std::array EXPORT_SETTINGS = {{ @@ -306,8 +306,8 @@ namespace vcpkg::Export {OPTION_IFW_REPOSITORY_DIR_PATH, "Specify the directory path for the exported repository"}, {OPTION_IFW_CONFIG_FILE_PATH, "Specify the temporary file path for the installer configuration"}, {OPTION_IFW_INSTALLER_FILE_PATH, "Specify the file path for the exported installer"}, - {OPTION_CHOCOLATEY_MAINTAINER, "Specify the maintainer for the exported Chocolatey package"}, - {OPTION_CHOCOLATEY_VERSION_SUFFIX, "Specify the version suffix to add for the exported Chocolatey package"}, + {OPTION_CHOCOLATEY_MAINTAINER, "Specify the maintainer for the exported Chocolatey package (experimental feature)"}, + {OPTION_CHOCOLATEY_VERSION_SUFFIX, "Specify the version suffix to add for the exported Chocolatey package (experimental feature)"}, }}; const CommandStructure COMMAND_STRUCTURE = {