diff --git a/Applications/DataExplorer/mainwindow.cpp b/Applications/DataExplorer/mainwindow.cpp index 43bc60ce80fec4077588d03b5892ae167bc60c39..dbe904f2d0eeb1f9b5ba0d77f209ba1e5d58c1db 100644 --- a/Applications/DataExplorer/mainwindow.cpp +++ b/Applications/DataExplorer/mainwindow.cpp @@ -728,9 +728,8 @@ void MainWindow::showLicense() void MainWindow::about() { - QString about("<a href='http://www.opengeosys.org'>http://www.opengeosys.org</a><br /><br />"); - about.append(QString("Version: <a href='https://github.com/ufz/ogs/releases/tag/%2'>%1</a><br /><br />") - .arg(QString::fromStdString(BaseLib::BuildInfo::ogs_version)) + QString about("<a href='https://www.opengeosys.org'>www.opengeosys.org</a><br /><br />"); + about.append(QString("Version: %1<br />") .arg(QString::fromStdString(BaseLib::BuildInfo::ogs_version))); about.append(QString("Git commit: <a href='https://github.com/ufz/ogs/commit/%1'>%1</a><br />") diff --git a/scripts/cmake/ProjectSetup.cmake b/scripts/cmake/ProjectSetup.cmake index 7c56230303a7aafd2caf74c60e34dd9c1de66ca0..10225564e6702d2cd3b1b3bb05e9fb90e1b8e722 100644 --- a/scripts/cmake/ProjectSetup.cmake +++ b/scripts/cmake/ProjectSetup.cmake @@ -69,3 +69,18 @@ if(DESCRIBE_RESULT EQUAL 0) else() message(WARNING "Git repository contains no tags! Please run: git fetch --tags") endif() + +# Get git commit +execute_process( + COMMAND ${GIT_EXECUTABLE} log -1 --format=%H + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + OUTPUT_VARIABLE GIT_SHA1 + OUTPUT_STRIP_TRAILING_WHITESPACE +) + +execute_process( + COMMAND ${GIT_EXECUTABLE} log -1 --format=%h + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + OUTPUT_VARIABLE GIT_SHA1_SHORT + OUTPUT_STRIP_TRAILING_WHITESPACE +)