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
|
@ -31,6 +31,7 @@
|
|||
#include "parser/symtable.h"
|
||||
#include <getopt.h>
|
||||
#include <fstream>
|
||||
#include "git.h"
|
||||
|
||||
namespace funC {
|
||||
|
||||
|
@ -172,7 +173,7 @@ void usage(const char* progname) {
|
|||
"-R\tInclude operation rewrite comments in the output code\n"
|
||||
"-W<output-boc-file>\tInclude Fift code to serialize and save generated code into specified BoC file. Enables "
|
||||
"-A and -P.\n"
|
||||
"\t-V<version>\tShow func build version\n";
|
||||
"\t-V<version>\tShow func build information\n";
|
||||
std::exit(2);
|
||||
}
|
||||
|
||||
|
@ -215,7 +216,7 @@ int main(int argc, char* const argv[]) {
|
|||
funC::asm_preamble = funC::program_envelope = true;
|
||||
break;
|
||||
case 'V':
|
||||
std::cout << "Func build version: [" << BUILD_VERSION << "]\n";
|
||||
std::cout << "Func build information: [ Commit: " << GitMetadata::CommitSHA1() << ", Date: " << GitMetadata::CommitDate() << "]\n";
|
||||
std::exit(0);
|
||||
break;
|
||||
case 'h':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue