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:
parent
a12e3db5d3
commit
41a3418b7b
17 changed files with 195 additions and 124 deletions
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
This file is part of TON Blockchain source code.
|
||||
|
||||
TON Blockchain is free software; you can redistribute it and/or
|
||||
|
@ -14,13 +14,13 @@
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with TON Blockchain. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, as a special exception, the copyright holders give permission
|
||||
to link the code of portions of this program with the OpenSSL library.
|
||||
You must obey the GNU General Public License in all respects for all
|
||||
of the code used other than OpenSSL. If you modify file(s) with this
|
||||
exception, you may extend this exception to your version of the file(s),
|
||||
but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. If you delete this exception statement
|
||||
In addition, as a special exception, the copyright holders give permission
|
||||
to link the code of portions of this program with the OpenSSL library.
|
||||
You must obey the GNU General Public License in all respects for all
|
||||
of the code used other than OpenSSL. If you modify file(s) with this
|
||||
exception, you may extend this exception to your version of the file(s),
|
||||
but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. If you delete this exception statement
|
||||
from all source files in the program, then also delete it here.
|
||||
|
||||
Copyright 2017-2020 Telegram Systems LLP
|
||||
|
@ -159,7 +159,7 @@ void test1() {
|
|||
std::cout << " cb = " << cb.finalize() << std::endl;
|
||||
}
|
||||
}
|
||||
/*
|
||||
/*
|
||||
{
|
||||
vm::CellBuilder cb;
|
||||
td::BitArray<256> hash;
|
||||
|
@ -246,7 +246,8 @@ td::Status test_vset() {
|
|||
void usage() {
|
||||
std::cout << "usage: dump-block [-t<typename>][-S][<boc-file>]\n\tor dump-block -h\n\tDumps specified blockchain "
|
||||
"block or state "
|
||||
"from <boc-file>, or runs some tests\n\t-S\tDump a blockchain state instead of a block\n";
|
||||
"from <boc-file>, or runs some tests\n\t-S\tDump a blockchain state instead of a block\n"
|
||||
"\t-V<version>\tShow fift build version\n";
|
||||
std::exit(2);
|
||||
}
|
||||
|
||||
|
@ -259,7 +260,7 @@ int main(int argc, char* const argv[]) {
|
|||
bool store_loaded = false;
|
||||
int dump = 3;
|
||||
auto zerostate = std::make_unique<block::ZerostateInfo>();
|
||||
while ((i = getopt(argc, argv, "CSt:hqv:")) != -1) {
|
||||
while ((i = getopt(argc, argv, "CSt:hqv:V")) != -1) {
|
||||
switch (i) {
|
||||
case 'C':
|
||||
type = &block::gen::t_VmCont;
|
||||
|
@ -280,6 +281,10 @@ int main(int argc, char* const argv[]) {
|
|||
store_loaded = true;
|
||||
dump = 0;
|
||||
break;
|
||||
case 'V':
|
||||
std::cout << "dump-block build version: [" << BUILD_VERSION << "]\n";
|
||||
std::exit(0);
|
||||
break;
|
||||
case 'h':
|
||||
usage();
|
||||
std::exit(2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue