mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Automatically integrates git build information into executables.
Usage:
func.exe -V
adnl-pong -V
validator-engine -V
and so on.
Result will be shown in the following format:
Func build information: [ Commit: d8b751d7a5
, Date: 2021-02-27 14:34:41 +0200]
This commit is contained in:
parent
41a3418b7b
commit
bab4c1637e
40 changed files with 492 additions and 78 deletions
|
@ -51,6 +51,7 @@
|
|||
#include <algorithm>
|
||||
#include <list>
|
||||
#include <set>
|
||||
#include "git.h"
|
||||
|
||||
#if TD_DARWIN || TD_LINUX
|
||||
#include <unistd.h>
|
||||
|
@ -1133,8 +1134,8 @@ int main(int argc, char *argv[]) {
|
|||
int v = VERBOSITY_NAME(FATAL) + (td::to_integer<int>(arg));
|
||||
SET_VERBOSITY_LEVEL(v);
|
||||
});
|
||||
p.add_option('V', "version", "shows rldp-http-proxy build version", [&]() {
|
||||
std::cout << "rldp-http-proxy build version: [" << BUILD_VERSION << "]\n";
|
||||
p.add_option('V', "version", "shows rldp-http-proxy build information", [&]() {
|
||||
std::cout << "rldp-http-proxy build information: [ Commit: " << GitMetadata::CommitSHA1() << ", Date: " << GitMetadata::CommitDate() << "]\n";
|
||||
std::exit(0);
|
||||
});
|
||||
p.add_option('h', "help", "prints a help message", [&]() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue