From 8b471bfee2f3f92675b6e73d6052de582dda8dd6 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 2 Aug 2022 13:30:09 +0200 Subject: [PATCH] Don't include commit hash --- CMakeLists.txt | 1 - cmake/VersionFeather.cmake | 27 --------------------------- cmake/config-feather.h.cmake | 1 - src/assets/about.txt | 2 +- src/dialog/AboutDialog.cpp | 1 - src/dialog/DebugInfoDialog.cpp | 2 +- 6 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 cmake/VersionFeather.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f5940e..63ff755 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,6 @@ get_directory_property(DEVICE_TREZOR_READY DIRECTORY "monero" DEFINITION DEVICE_ get_directory_property(TREZOR_DEP_LIBS DIRECTORY "monero" DEFINITION TREZOR_DEP_LIBS) include(CMakePackageConfigHelpers) -include(VersionFeather) include_directories(${EASYLOGGING_INCLUDE}) link_directories(${EASYLOGGING_LIBRARY_DIRS}) diff --git a/cmake/VersionFeather.cmake b/cmake/VersionFeather.cmake deleted file mode 100644 index f94567f..0000000 --- a/cmake/VersionFeather.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# SPDX-FileCopyrightText: 2020-2022 The Monero Project - -find_package(Git QUIET) - -# Sets FEATHER_COMMIT to the first 9 chars of the current commit hash. - -if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/githash.txt") - # This file added in source archives where the .git folder has been removed to optimize for space. - file(READ "githash.txt" COMMIT) - string(SUBSTRING ${COMMIT} 0 9 COMMIT) - message(STATUS "You are currently on commit ${COMMIT}") - set(FEATHER_COMMIT "${COMMIT}") -else() - execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse --short=9 HEAD RESULT_VARIABLE RET OUTPUT_VARIABLE COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE) - - if(RET) - message(WARNING "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive.") - set(FEATHER_COMMIT "unknown") - else() - string(SUBSTRING ${COMMIT} 0 9 COMMIT) - message(STATUS "You are currently on commit ${COMMIT}") - set(FEATHER_COMMIT "${COMMIT}") - endif() -endif() - -configure_file("cmake/config-feather.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/src/config-feather.h") \ No newline at end of file diff --git a/cmake/config-feather.h.cmake b/cmake/config-feather.h.cmake index 1e9f3f4..3800b0a 100644 --- a/cmake/config-feather.h.cmake +++ b/cmake/config-feather.h.cmake @@ -2,7 +2,6 @@ #define FEATHER_VERSION_H #define FEATHER_VERSION "@VERSION@" -#define FEATHER_COMMIT "@FEATHER_COMMIT@" #define TOR_VERSION "@TOR_VERSION@" diff --git a/src/assets/about.txt b/src/assets/about.txt index db366e9..f560ba0 100644 --- a/src/assets/about.txt +++ b/src/assets/about.txt @@ -1,4 +1,4 @@ -Feather () +Feather Copyright (c) 2020-, The Monero Project diff --git a/src/dialog/AboutDialog.cpp b/src/dialog/AboutDialog.cpp index 14bca8b..deecf6f 100644 --- a/src/dialog/AboutDialog.cpp +++ b/src/dialog/AboutDialog.cpp @@ -19,7 +19,6 @@ AboutDialog::AboutDialog(QWidget *parent) auto about = Utils::fileOpenQRC(":assets/about.txt"); auto about_text = Utils::barrayToString(about); about_text = about_text.replace("", FEATHER_VERSION); - about_text = about_text.replace("", FEATHER_COMMIT); about_text = about_text.replace("", QString::number(QDate::currentDate().year())); ui->copyrightText->setPlainText(about_text); diff --git a/src/dialog/DebugInfoDialog.cpp b/src/dialog/DebugInfoDialog.cpp index 58b7468..5abeed4 100644 --- a/src/dialog/DebugInfoDialog.cpp +++ b/src/dialog/DebugInfoDialog.cpp @@ -45,7 +45,7 @@ void DebugInfoDialog::updateInfo() { else torStatus = "Unknown"; - ui->label_featherVersion->setText(QString("%1-%2").arg(FEATHER_VERSION, FEATHER_COMMIT)); + ui->label_featherVersion->setText(QString("%1").arg(FEATHER_VERSION)); ui->label_walletHeight->setText(QString::number(m_ctx->wallet->blockChainHeight())); ui->label_daemonHeight->setText(QString::number(m_ctx->wallet->daemonBlockChainHeight()));