mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-04 20:51:27 +02:00
Warn when binaries are built from a dirty branch.
Adjusted version flag behavior in bitcoin-tx, bitcoin-wallet, and bitcoind to match. Added functionality in gen-manpages.sh to warning when attempting to generate man pages for binaries built from a dirty branch.
This commit is contained in:
@ -40,6 +40,7 @@ static void SetupBitcoinTxArgs(ArgsManager &argsman)
|
||||
{
|
||||
SetupHelpOptions(argsman);
|
||||
|
||||
argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-create", "Create new, empty TX.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-json", "Select JSON output", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-txid", "Output only the hex-encoded transaction id of the resultant transaction.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
@ -95,13 +96,16 @@ static int AppInitRawTx(int argc, char* argv[])
|
||||
|
||||
fCreateBlank = gArgs.GetBoolArg("-create", false);
|
||||
|
||||
if (argc < 2 || HelpRequested(gArgs)) {
|
||||
if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) {
|
||||
// First part of help message is specific to this utility
|
||||
std::string strUsage = PACKAGE_NAME " bitcoin-tx utility version " + FormatFullVersion() + "\n\n" +
|
||||
"Usage: bitcoin-tx [options] <hex-tx> [commands] Update hex-encoded bitcoin transaction\n" +
|
||||
"or: bitcoin-tx [options] -create [commands] Create hex-encoded bitcoin transaction\n" +
|
||||
"\n";
|
||||
strUsage += gArgs.GetHelpMessage();
|
||||
std::string strUsage = PACKAGE_NAME " bitcoin-tx utility version " + FormatFullVersion() + "\n";
|
||||
if (!gArgs.IsArgSet("-version")) {
|
||||
strUsage += "\n"
|
||||
"Usage: bitcoin-tx [options] <hex-tx> [commands] Update hex-encoded bitcoin transaction\n"
|
||||
"or: bitcoin-tx [options] -create [commands] Create hex-encoded bitcoin transaction\n"
|
||||
"\n";
|
||||
strUsage += gArgs.GetHelpMessage();
|
||||
}
|
||||
|
||||
tfm::format(std::cout, "%s", strUsage);
|
||||
|
||||
|
Reference in New Issue
Block a user