feat(daemon): pack the project into a confined source archive
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 4s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 18s

This commit is contained in:
faumaray committed 2026-12-04 02:32:52 +03:00
1 parent 3a3376c331
commit 69d1a8d274
8 files changed
+101 -2

No files matched your search

+10
View File
@@ -1479,6 +1479,7 @@ struct DaemonCmdOptions {
std::optional<std::string> member_arg;
std::string graph_format_arg{"dot"};
std::optional<std::string> target_arg;
std::optional<std::string> pack_output_arg;
std::optional<std::string> file_filter_arg;
std::string limit_arg{"50"};
std::string timeout_ms_arg{"2000"};
@@ -1578,6 +1579,10 @@ int execute_daemon_command(std::string_view sub, const DaemonCmdOptions &opts) {
request_json = R"({"op":"info"})";
} else if (sub == "clean") {
request_json = opts.force ? R"({"op":"clean","all":true})" : R"({"op":"clean"})";
} else if (sub == "pack") {
request_json = opts.pack_output_arg ? std::format(R"({{"op":"pack","output":{}}})",
Util::json_quote(*opts.pack_output_arg))
: R"({"op":"pack"})";
} else if (sub == "editor_status") {
request_json = R"({"op":"editor_status"})";
} else if (sub == "workspace_members") {
@@ -2713,6 +2718,11 @@ int main(int argc, char **argv) {
.option_default("--profile", "-p", "Profile to resolve", daemon_opts.profile_arg, "debug")
.option("--member", "", "Workspace member (required for workspace roots)",
daemon_opts.member_arg);
auto &daemon_pack_cmd =
daemon_cmd.subcommand("pack", "Create a deterministic source archive in the build root");
configure_daemon_common(daemon_pack_cmd);
daemon_pack_cmd.option("--output", "-o", "Archive path relative to the build root",
daemon_opts.pack_output_arg);
auto &daemon_target_cmd =
daemon_cmd.subcommand("target", "Target metadata served by the daemon");
auto &daemon_target_info_cmd = daemon_target_cmd.subcommand(