Fix time stamp for build

This commit is contained in:
Magne Sjaastad
2025-07-29 11:55:23 +02:00
committed by GitHub
parent 9bb27caa07
commit af58c8c580
3 changed files with 15 additions and 3 deletions
@@ -37,4 +37,6 @@
#define RESINSIGHT_GIT_HASH "@RESINSIGHT_GIT_HASH@"
#define RESINSIGHT_BUILD_SYSTEM_ID "@RESINSIGHT_BUILD_SYSTEM_ID@"
#define RESINSIGHT_BUILD_SYSTEM_ID "@RESINSIGHT_BUILD_SYSTEM_ID@"
#define RESINSIGHT_BUILD_DATE "@RESINSIGHT_BUILD_DATE@"
@@ -172,8 +172,8 @@ void RicHelpAboutFeature::onActionTriggered( bool isChecked )
}
dlg.addVersionEntry( " ", "" );
QString nowDate = QDateTime::currentDateTime().toString( "yyyy-MMM-dd" );
dlg.addVersionEntry( "", QString( "Build date: " ) + nowDate );
QString buildDate = RESINSIGHT_BUILD_DATE;
dlg.addVersionEntry( "", QString( "Build date: " ) + buildDate );
dlg.addVersionEntry( "", "SHA " + QString( RESINSIGHT_GIT_HASH ) );
dlg.create();
+10
View File
@@ -422,6 +422,16 @@ if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
endif()
endif()
if(UNIX)
execute_process(
COMMAND date "+%Y-%m-%d %H:%M:%S"
OUTPUT_VARIABLE RESINSIGHT_BUILD_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else()
string(TIMESTAMP RESINSIGHT_BUILD_DATE "%Y-%m-%d %H:%M:%S")
endif()
# ##############################################################################
# OpenVDS seismic file access
# ##############################################################################