Skip to content

Commit

Permalink
add -version cli arg
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerZhongAWS authored Sep 23, 2024
1 parent a2423da commit 8a04096
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ bool process_cli(int argc, char ** argv, LocalproxyConfig &cfg, ptree &settings,
options_description cliargs_desc("Allowed options");
cliargs_desc.add_options()
("help,h", "Show help message")
("version", "Show version")
("access-token,t", value<string>()->required(), "Client access token")
("client-token,i", value<string>(), "Optional Client Token")
("proxy-endpoint,e", value<string>(), "Endpoint of proxy server with port (if not default 443). Example: data.tunneling.iot.us-east-1.amazonaws.com:443")
Expand All @@ -177,6 +178,11 @@ bool process_cli(int argc, char ** argv, LocalproxyConfig &cfg, ptree &settings,
;
store(parse_command_line(argc, argv, cliargs_desc), vm);

if (vm.count("version"))
{
std::cerr << "3.1.2" << "\n"; // hardcoding this as a temporary measure
return false;
}
if (vm.count("help"))
{
std::cerr << cliargs_desc << "\n";
Expand Down

0 comments on commit 8a04096

Please sign in to comment.