Git commit ID added to stamp

Fixes #2921: getValue() now also returns pilot position
Fixes #3062: Close any Lua open files when radio powers off
Fixes #3095: Lua string library added (only 6k bytes of flash used)
Re #3095: luaGetVersion() also returns version as numbers
(Ported from master 7ef790d3..4d0bd14ad and squashed into one commit)
This commit is contained in:
Damjan Adamic
2015-11-25 18:00:44 +01:00
parent 7e6dc610ac
commit 7538fcfb51
11 changed files with 87 additions and 41 deletions
+12
View File
@@ -24,3 +24,15 @@ MACRO (NOW RESULT)
ENDIF (WIN32)
ENDMACRO (NOW)
MACRO (GIT_ID RESULT)
IF (WIN32)
EXECUTE_PROCESS(COMMAND "cmd" " /C git rev-parse HEAD" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..):(..).*" "\\1:\\2:00" ${RESULT} ${${RESULT}})
ELSEIF(UNIX)
EXECUTE_PROCESS(COMMAND "git" "rev-parse" "HEAD" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(.*)\n" "\\1" ${RESULT} ${${RESULT}})
ELSE (WIN32)
MESSAGE(SEND_ERROR "Git ID implemented")
SET(${RESULT} 0)
ENDIF (WIN32)
ENDMACRO (GIT_ID)