feat(cli): list registry releases
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 7s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 18s

This commit is contained in:
faumaray committed 2026-12-04 03:00:02 +03:00
1 parent 18caf2e7e6
commit 3f181dc241
7 files changed
+75 -1

No files matched your search

+2
View File
@@ -49,6 +49,8 @@ check_process(0 "Usage: vbs publish " "" publish --help)
check_process(0 "Usage: vbs publish-binary " "" publish-binary --help)
check_process(0 "Usage: vbs binaries <command>.*Commands:.*list.*fetch" "" binaries --help)
check_process(0 "Usage: vbs binaries list " "" binaries list --help)
check_process(0 "Usage: vbs releases list " "" releases list --help)
check_process(2 "" "--registry and --name are required" releases list)
check_process(0 "Usage: vbs binaries fetch " "" binaries fetch --help)
check_process(2 "" "--registry, --name, and --version are required" binaries list)
check_process(2 "" "--variant and --output are required" binaries fetch --registry http://127.0.0.1:1 --name p --version 1.0.0)
+12
View File
@@ -1004,6 +1004,18 @@ target_include_directories(hello_pkg PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include
Void::Testing::require(fetched_bytes.has_value());
Void::Testing::expect(*fetched_bytes == "CLI_BINARY_VARIANT_BYTES");
Platform::ProcessRequest releases_list;
releases_list.executable = vbs_bin;
releases_list.arguments = {"releases", "list", "--registry", reg_url, "--name", "hello-pkg"};
releases_list.environment.set_vars["VBS_REGISTRY_TOKEN"] = *tok;
auto releases_res = Platform::run_supervised(releases_list);
Void::Testing::expect(releases_res.has_value() && releases_res->succeeded());
if (releases_res) {
Void::Testing::expect(releases_res->stdout_data.find("1.0.0") != std::string::npos);
Void::Testing::expect(releases_res->stdout_data.find("1.1.0") != std::string::npos);
Void::Testing::expect(releases_res->stdout_data.find("active") != std::string::npos);
}
// 2. Create a consumer project declaring `.package("hello-pkg", "^1.0").registry(reg_url)`.
const auto cons_dir = tmp / "consumer";
const auto cons_build = tmp / "consumer_build";