1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Adds command line parameter -V that shows build version to the binaries.

Build number controlled in top level CMakeLists.txt file via -DBUILD_VERSION variable.
Usage:
adnl-pong -V
validator-engine -V
and so on.
This commit is contained in:
Alex Melman 2021-02-27 14:34:41 +02:00 committed by main
parent a12e3db5d3
commit 41a3418b7b
17 changed files with 195 additions and 124 deletions

View file

@ -2308,6 +2308,10 @@ int main(int argc, char* argv[]) {
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(FATAL) + verbosity);
return (verbosity >= 0 && verbosity <= 20) ? td::Status::OK() : td::Status::Error("verbosity must be 0..20");
});
p.add_option('V', "version", "show tonlib-cli build version", [&]() {
std::cout << "Fift build version: [" << BUILD_VERSION << "]\n";
std::exit(0);
});
p.add_checked_option('C', "config-force", "set lite server config, drop config related blockchain cache",
[&](td::Slice arg) {
TRY_RESULT(data, td::read_file_str(arg.str()));