diff --git a/app/modules/node.c b/app/modules/node.c index a7cdd719..b50fc0db 100644 --- a/app/modules/node.c +++ b/app/modules/node.c @@ -130,11 +130,14 @@ static int node_info( lua_State* L ) lua_pushinteger(L, flash_rom_get_speed()); lua_pushstring(L, BUILDINFO_BRANCH); lua_pushstring(L, BUILDINFO_COMMIT_ID); + lua_pushstring(L, BUILDINFO_RELEASE); + lua_pushnumber(L, BUILDINFO_RELEASE_DTS); lua_pushboolean(L, BUILDINFO_SSL); lua_pushstring(L, BUILDINFO_LFS); lua_pushstring(L, BUILDINFO_MODULES); lua_pushstring(L, BUILDINFO_BUILD_TYPE); - return 14; + + return 16; } // Lua: chipid() diff --git a/tools/update_buildinfo.sh b/tools/update_buildinfo.sh index 081fc543..b4a08813 100644 --- a/tools/update_buildinfo.sh +++ b/tools/update_buildinfo.sh @@ -4,6 +4,7 @@ BUILD_DATE="$(date "+%Y-%m-%d %H:%M")" COMMIT_ID="$(git rev-parse HEAD)" BRANCH="$(git rev-parse --abbrev-ref HEAD | sed -r 's/[\/\\]+/_/g')" RELEASE="$(git describe --tags --long | sed -r 's/(.*)-(.*)-.*/\1 +\2/g' | sed 's/ +0$//')" +RELEASE_DTS=0$(git show -s --format=%cd --date=format:"%Y%m%d%H%M" HEAD) # figure out whether SSL is enabled in user_config.h if grep -Eq "^#define CLIENT_SSL_ENABLE" ../app/include/user_config.h; then @@ -39,6 +40,7 @@ EndOfMessage echo "#define BUILDINFO_BRANCH \""$BRANCH"\"" >> $TEMPFILE echo "#define BUILDINFO_COMMIT_ID \""$COMMIT_ID"\"" >> $TEMPFILE echo "#define BUILDINFO_RELEASE \""$RELEASE"\"" >> $TEMPFILE +echo "#define BUILDINFO_RELEASE_DTS "$RELEASE_DTS"" >> $TEMPFILE echo "#define BUILDINFO_SSL "$SSL >> $TEMPFILE echo "#define BUILDINFO_SSL_STR \""$SSL"\"" >> $TEMPFILE echo "#define BUILDINFO_BUILD_TYPE \""$BUILD_TYPE"\"" >> $TEMPFILE @@ -50,6 +52,8 @@ cat >> $TEMPFILE << EndOfMessage2 #define NODE_VERSION_LONG \\ "\tbranch: '" BUILDINFO_BRANCH "'\n" \\ "\tcommit: '" BUILDINFO_COMMIT_ID "'\n" \\ + "\trelease: '" BUILDINFO_RELEASE "'\n" \\ + "\trelease DTS: '" BUILDINFO_RELEASE_DTS "'\n" \\ "\tSSL: '" BUILDINFO_SSL_STR "'\n" \\ "\tBuild type: '" BUILDINFO_BUILD_TYPE "'\n" \\ "\tLFS: '" BUILDINFO_LFS "'\n" \\