diff options
-rw-r--r-- | cmake/genrev.cmake | 8 | ||||
-rw-r--r-- | cmake/showoptions.cmake | 4 | ||||
-rwxr-xr-x | contrib/git/rev_id.cmd | 29 | ||||
-rwxr-xr-x | contrib/git/rev_id.sh | 20 | ||||
-rw-r--r-- | revision.h.in.cmake | 9 | ||||
-rw-r--r-- | src/server/shared/Debugging/WheatyExceptionReport.cpp | 4 | ||||
-rwxr-xr-x | src/server/shared/SystemConfig.h | 7 | ||||
-rwxr-xr-x | src/server/worldserver/Master.cpp | 2 |
8 files changed, 14 insertions, 69 deletions
diff --git a/cmake/genrev.cmake b/cmake/genrev.cmake index b7e0bf16c8b..9ac4c04019e 100644 --- a/cmake/genrev.cmake +++ b/cmake/genrev.cmake @@ -54,14 +54,10 @@ if(NOT rev_info) # No valid ways available to find/set the revision/hash, so let's force some defaults set(rev_hash_str "Archive") set(rev_hash "0") - set(rev_id_str "0") - set(rev_id "0") else() # Extract revision and hash from git string(REGEX REPLACE init-|[0-9]+-g "" rev_hash_str ${rev_info}) string(REGEX REPLACE [+]+ "" rev_hash ${rev_hash_str}) - string(REGEX REPLACE init-|-g[^+]+ "" rev_id_str ${rev_info}) - string(REGEX REPLACE [+]+ "" rev_id ${rev_id_str}) endif() # Its not set during initial run @@ -70,11 +66,11 @@ if(NOT BUILDDIR) endif() # Create the actual revision.h file from the above params -if(NOT "${rev_id_cached}" MATCHES "${rev_id_str}") +if(NOT "${rev_hash_cached}" MATCHES "${rev_hash_str}") configure_file( "${CMAKE_SOURCE_DIR}/revision.h.in.cmake" "${BUILDDIR}/revision.h" @ONLY ) - set(rev_id_cached "${rev_id_str}" CACHE INTERNAL "Cached revision ID") + set(rev_hash_cached "${rev_hash_str}" CACHE INTERNAL "Cached commit-hash") endif() diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake index ade607ee409..246c0a54e79 100644 --- a/cmake/showoptions.cmake +++ b/cmake/showoptions.cmake @@ -1,6 +1,6 @@ # output generic information about the core and buildtype chosen - -message("* TrinityCore revision : ${rev_id_str} (${rev_hash_str})") +message("") +message("* TrinityCore commithash : ${rev_hash_str}") if( UNIX ) message("* Build binaries in : ${CMAKE_BUILD_TYPE} mode") endif() diff --git a/contrib/git/rev_id.cmd b/contrib/git/rev_id.cmd deleted file mode 100755 index 745e85ae59d..00000000000 --- a/contrib/git/rev_id.cmd +++ /dev/null @@ -1,29 +0,0 @@ -@echo off &setlocal EnableDelayedExpansion -set usage=Usage: %0 ^<-id ^| -hash^> -set errormsg=Error: No valid revision information found - -set cmres=false -if "%1"=="-id" set cmres=true -if "%1"=="-hash" set cmres=true -if not "!cmres!"=="true" ( - echo !usage! - exit /B 1 -) - -for /F "tokens=2,3 delims=-" %%a IN ('"git describe --match=init --abbrev=12"') do ( - set res=false - if %%c=="" set res=true - if %%d=="" set res=true - if "!res!"=="true" ( - echo !errormsg! - exit /B 1 - ) - - if "%1"=="-id" ( - echo %%a - ) else if "%1"=="-hash" ( - set str=%%b - set str=!str:~1! - echo !str! - ) -) diff --git a/contrib/git/rev_id.sh b/contrib/git/rev_id.sh deleted file mode 100755 index 0d3d8d5da85..00000000000 --- a/contrib/git/rev_id.sh +++ /dev/null @@ -1,20 +0,0 @@ -#/bin/bash -command=$(git describe --match init --abbrev=12) -IFS="-" -cmdarray=($command) - -if [ "$1" != "-id" ] && [ "$1" != "-hash" ]; then - echo "Usage: $0 <-id | -hash>" - exit -fi - -if [ "${cmdarray[1]}" == "" ] || [ "${cmdarray[2]}" == "" ]; then - echo "Error: No valid revision information found" - exit 1 -fi - -if [ "$1" == "-id" ]; then - echo ${cmdarray[1]} -elif [ "$1" == "-hash" ]; then - echo ${cmdarray[2]:1} -fi diff --git a/revision.h.in.cmake b/revision.h.in.cmake index 181a34a57f3..ac993190d4c 100644 --- a/revision.h.in.cmake +++ b/revision.h.in.cmake @@ -1,9 +1,8 @@ #ifndef __REVISION_H__ #define __REVISION_H__ - #define _REVISION "@rev_id_str@" #define _HASH "@rev_hash_str@" - #define FILEVER 0,0,@rev_id@,0 - #define PRODUCTVER 0,0,@rev_id@,0 - #define STRFILEVER "0, 0, @rev_id@, @rev_hash@" - #define STRPRODUCTVER "0, 0, @rev_id@, @rev_hash@" + #define FILEVER 0,0,0 + #define PRODUCTVER 0,0,0 + #define STRFILEVER "0, 0, @rev_hash_str@" + #define STRPRODUCTVER "0, 0, @rev_hash_str@" #endif // __REVISION_H__ diff --git a/src/server/shared/Debugging/WheatyExceptionReport.cpp b/src/server/shared/Debugging/WheatyExceptionReport.cpp index 835d8bb87af..6a0d4e69be4 100644 --- a/src/server/shared/Debugging/WheatyExceptionReport.cpp +++ b/src/server/shared/Debugging/WheatyExceptionReport.cpp @@ -96,10 +96,10 @@ PEXCEPTION_POINTERS pExceptionInfo) SYSTEMTIME systime; GetLocalTime(&systime); sprintf(m_szDumpFileName, "%s\\%s_%s_[%u-%u_%u-%u-%u].dmp", - crash_folder_path, _REVISION, pos, systime.wDay, systime.wMonth, systime.wHour, systime.wMinute, systime.wSecond); + crash_folder_path, _HASH, pos, systime.wDay, systime.wMonth, systime.wHour, systime.wMinute, systime.wSecond); sprintf(m_szLogFileName, "%s\\%s_%s_[%u-%u_%u-%u-%u].txt", - crash_folder_path, _REVISION, pos, systime.wDay, systime.wMonth, systime.wHour, systime.wMinute, systime.wSecond); + crash_folder_path, _HASH, pos, systime.wDay, systime.wMonth, systime.wHour, systime.wMinute, systime.wSecond); m_hDumpFile = CreateFile(m_szDumpFileName, GENERIC_WRITE, diff --git a/src/server/shared/SystemConfig.h b/src/server/shared/SystemConfig.h index 9fd1c66b251..c15d3de2461 100755 --- a/src/server/shared/SystemConfig.h +++ b/src/server/shared/SystemConfig.h @@ -34,12 +34,11 @@ #if PLATFORM == PLATFORM_WINDOWS # ifdef _WIN64 -# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " " _BUILD_DIRECTIVE " Hash: " _HASH " (Win64, " _ENDIAN_STRING ")" +# define _FULLVERSION _PACKAGENAME "Hash: " _HASH " (Win64, "_BUILD_DIRECTIVE " (" _ENDIAN_STRING "))" # else -# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " " _BUILD_DIRECTIVE " Hash: " _HASH " (Win32, " _ENDIAN_STRING ")" +# define _FULLVERSION _PACKAGENAME "Hash: " _HASH " (Win32, " _BUILD_DIRECTIVE " (" _ENDIAN_STRING "))" # endif #else -# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " " _BUILD_DIRECTIVE " Hash: " _HASH " (Unix, " _ENDIAN_STRING ")" +# define _FULLVERSION _PACKAGENAME "Hash: " _HASH " (Unix, " _BUILD_DIRECTIVE " (" _ENDIAN_STRING "))" #endif #endif - diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp index e4f51736c14..3876a7a1f8f 100755 --- a/src/server/worldserver/Master.cpp +++ b/src/server/worldserver/Master.cpp @@ -456,7 +456,7 @@ bool Master::_StartDB() clearOnlineAccounts(); ///- Insert version info into DB - WorldDatabase.PExecute("UPDATE version SET core_version = '%s', core_revision = '%s'", _FULLVERSION, _REVISION); + WorldDatabase.PExecute("UPDATE version SET core_version = '%s', core_revision = '%s'", _FULLVERSION, _HASH); sWorld->LoadDBVersion(); |