diff options
author | Unknown <fireice2@o2.pl> | 2017-11-10 19:19:07 +0000 |
---|---|---|
committer | Unknown <fireice2@o2.pl> | 2017-11-10 19:19:07 +0000 |
commit | 0bae47a75488e2fd1bcab8b141976763e4d81e95 (patch) | |
tree | c01f1c842878fee8eb8f921be1f0e226b2f61e1e /xmrstak | |
parent | d35893d926c74893d7c85d1b87b24ffa55744649 (diff) | |
download | xmr-stak-0bae47a75488e2fd1bcab8b141976763e4d81e95.zip xmr-stak-0bae47a75488e2fd1bcab8b141976763e4d81e95.tar.gz |
Define GIT_COMMIT_HASH via cmake or git archive
Diffstat (limited to 'xmrstak')
-rw-r--r-- | xmrstak/cli/cli-miner.cpp | 2 | ||||
-rw-r--r-- | xmrstak/version.hpp | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/xmrstak/cli/cli-miner.cpp b/xmrstak/cli/cli-miner.cpp index 5c16c1b..d103293 100644 --- a/xmrstak/cli/cli-miner.cpp +++ b/xmrstak/cli/cli-miner.cpp @@ -85,7 +85,7 @@ void help() cout<<" -u, --user USERNAME pool user name or wallet address"<<endl; cout<<" -p, --pass PASSWD pool password, in the most cases x or empty \"\""<<endl; cout<<" \n"<<endl; - cout<<XMR_STAK_NAME<<" "<<XMR_STAK_VERSION<<endl; + cout<<XMR_STAK_NAME << " " << XMR_STAK_VERSION << " " << GIT_COMMIT_HASH << " " << GIT_BRANCH << endl; cout<<"Brought to by fireice_uk and psychocrypt under GPLv3."<<endl; } diff --git a/xmrstak/version.hpp b/xmrstak/version.hpp index 44214c8..4267c75 100644 --- a/xmrstak/version.hpp +++ b/xmrstak/version.hpp @@ -1,4 +1,17 @@ #pragma once +//! git will put "#define GIT_ARCHIVE 1" on the next line inside archives. $Format:%n#define GIT_ARCHIVE 1$ +#if defined(GIT_ARCHIVE) && !defined(GIT_COMMIT_HASH) +#define GIT_COMMIT_HASH "$Format:%h$" +#endif + +#ifndef GIT_COMMIT_HASH +#define GIT_COMMIT_HASH "0000000" +#endif + +#ifndef GIT_BRANCH +#define GIT_BRANCH "unknown" +#endif + #define XMR_STAK_NAME "xmr-stak" #define XMR_STAK_VERSION "2.0.0-predev" |