diff --git a/cmake/MyUtils.cmake b/cmake/MyUtils.cmake index 616dd88..d69fa1f 100644 --- a/cmake/MyUtils.cmake +++ b/cmake/MyUtils.cmake @@ -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 diff --git a/src/page.h b/src/page.h index 2c8d72e..3493d5d 100644 --- a/src/page.h +++ b/src/page.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); diff --git a/src/templates/footer.html b/src/templates/footer.html index d4ab012..e5db414 100644 --- a/src/templates/footer.html +++ b/src/templates/footer.html @@ -1,7 +1,7 @@