mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
git_branch_name added to footer
This commit is contained in:
parent
41e2e22cde
commit
32a56f32f1
4 changed files with 14 additions and 2 deletions
|
@ -42,6 +42,16 @@ macro(create_git_version)
|
|||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Get current branch name
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_BRANCH_NAME
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
|
||||
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/src/version.h.in
|
||||
${CMAKE_BINARY_DIR}/gen/version.h
|
||||
|
|
|
@ -5680,7 +5680,8 @@ namespace xmreg
|
|||
static const mstch::map footer_context {
|
||||
{"last_git_commit_hash", string {GIT_COMMIT_HASH}},
|
||||
{"last_git_commit_date", string {GIT_COMMIT_DATETIME}},
|
||||
{"monero_version_full" , string {MONERO_VERSION_FULL}},
|
||||
{"git_branch_name" , string {GIT_BRANCH_NAME}},
|
||||
{"monero_version_full" , string {MONERO_VERSION_FULL}}
|
||||
};
|
||||
|
||||
string footer_html = mstch::render(xmreg::read(TMPL_FOOTER), footer_context);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="center">
|
||||
<h6 style="margin-top:10px">
|
||||
<a href="https://github.com/moneroexamples/onion-monero-blockchain-explorer">source code</a>
|
||||
| explorer version: {{last_git_commit_date}}-{{last_git_commit_hash}}
|
||||
| explorer version: {{git_branch_name}}-{{last_git_commit_date}}-{{last_git_commit_hash}}
|
||||
| monero version: {{monero_version_full}}
|
||||
</h6>
|
||||
</div>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#define GIT_BRANCH "@GIT_BRANCH@"
|
||||
#define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@"
|
||||
#define GIT_COMMIT_DATETIME "@GIT_COMMIT_DATETIME@"
|
||||
#define GIT_BRANCH_NAME "@GIT_BRANCH_NAME@"
|
||||
|
||||
|
||||
#endif //XMRBLOCKS_VERSION_H_IN_H
|
||||
|
|
Loading…
Reference in a new issue