summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/cli.hpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2023-12-06 17:38:36 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2023-12-11 15:41:58 +0100
commitbcbfd1fc659df948899fa34e8a1af7fa6f7920e6 (patch)
treea02c4c333b45f6511b9a3a6055f1b3e684242579 /src/other_tools/just_mr/cli.hpp
parent57675848dfe0b4780948e1f4457101fc95a3efaf (diff)
downloadjustbuild-bcbfd1fc659df948899fa34e8a1af7fa6f7920e6.tar.gz
just-mr: move rc handling to a separate library
Diffstat (limited to 'src/other_tools/just_mr/cli.hpp')
-rw-r--r--src/other_tools/just_mr/cli.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/other_tools/just_mr/cli.hpp b/src/other_tools/just_mr/cli.hpp
index c33d30d0..3d7a8980 100644
--- a/src/other_tools/just_mr/cli.hpp
+++ b/src/other_tools/just_mr/cli.hpp
@@ -89,6 +89,28 @@ struct MultiRepoRemoteAuthArguments {
std::optional<std::filesystem::path> tls_client_key{std::nullopt};
};
+enum class SubCommand {
+ kUnknown,
+ kMRVersion,
+ kFetch,
+ kUpdate,
+ kSetup,
+ kSetupEnv,
+ kJustDo,
+ kJustSubCmd
+};
+
+struct CommandLineArguments {
+ SubCommand cmd{SubCommand::kUnknown};
+ MultiRepoCommonArguments common;
+ MultiRepoLogArguments log;
+ MultiRepoSetupArguments setup;
+ MultiRepoFetchArguments fetch;
+ MultiRepoUpdateArguments update;
+ MultiRepoJustSubCmdsArguments just_cmd;
+ MultiRepoRemoteAuthArguments auth;
+};
+
static inline void SetupMultiRepoCommonArguments(
gsl::not_null<CLI::App*> const& app,
gsl::not_null<MultiRepoCommonArguments*> const& clargs) {