summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/cli.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-03-07 14:28:56 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-03-07 15:10:00 +0100
commit3c2185bf17b1c1a631366aa11591da3e3beb51eb (patch)
treedbead789637df095b07214ea5b134ddf66fa6412 /src/other_tools/just_mr/cli.hpp
parent4181505a187a158d36a1845a4a796af5671cc7ab (diff)
downloadjustbuild-3c2185bf17b1c1a631366aa11591da3e3beb51eb.tar.gz
Just-mr: Add --local-launcher option
Also update just-mr section-1 man page
Diffstat (limited to 'src/other_tools/just_mr/cli.hpp')
-rw-r--r--src/other_tools/just_mr/cli.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/other_tools/just_mr/cli.hpp b/src/other_tools/just_mr/cli.hpp
index 2174c331..c9a36387 100644
--- a/src/other_tools/just_mr/cli.hpp
+++ b/src/other_tools/just_mr/cli.hpp
@@ -37,6 +37,7 @@ struct MultiRepoCommonArguments {
std::optional<std::filesystem::path> checkout_locations_file{std::nullopt};
std::vector<std::string> explicit_distdirs{};
JustMR::PathsPtr just_mr_paths = std::make_shared<JustMR::Paths>();
+ std::optional<std::vector<std::string>> local_launcher{std::nullopt};
std::optional<std::filesystem::path> just_path{std::nullopt};
std::optional<std::string> main{std::nullopt};
std::optional<std::filesystem::path> rc_path{std::nullopt};
@@ -100,6 +101,18 @@ static inline void SetupMultiRepoCommonArguments(
"Specification file for checkout locations.")
->type_name("CHECKOUT_LOCATION");
app->add_option_function<std::string>(
+ "--local-launcher",
+ [clargs](auto const& launcher_raw) {
+ clargs->local_launcher =
+ nlohmann::json::parse(launcher_raw)
+ .template get<std::vector<std::string>>();
+ },
+ "JSON array with the list of strings representing the launcher to "
+ "prepend actions' commands before being executed locally.")
+ ->type_name("JSON")
+ ->run_callback_for_default()
+ ->default_val(nlohmann::json{"env", "--"}.dump());
+ app->add_option_function<std::string>(
"--distdir",
[clargs](auto const& distdir_raw) {
clargs->explicit_distdirs.emplace_back(