From 739b675b72a65659d18c0aed4d8494bb9d3344c2 Mon Sep 17 00:00:00 2001 From: Gregor Hartmann Date: Thu, 15 Aug 2019 12:33:22 +0200 Subject: [PATCH] add build_date to build info (#2888) --- app/include/user_version.h | 2 +- tools/update_buildinfo.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/include/user_version.h b/app/include/user_version.h index 33817c5c..ddcd8c66 100644 --- a/app/include/user_version.h +++ b/app/include/user_version.h @@ -17,7 +17,7 @@ // Can be removed when the script is adapted #ifndef BUILD_DATE -#define BUILD_DATE "unspecified" +#define BUILD_DATE BUILDINFO_BUILD_DATE #endif extern char SDK_VERSION[]; diff --git a/tools/update_buildinfo.sh b/tools/update_buildinfo.sh index 99a376f9..66370a90 100755 --- a/tools/update_buildinfo.sh +++ b/tools/update_buildinfo.sh @@ -6,6 +6,7 @@ COMMIT_ID="$(git rev-parse HEAD)" BRANCH="$(git rev-parse --abbrev-ref HEAD | sed -E 's/[\/\\]+/_/g')" RELEASE="$(git describe --tags --long | sed -E 's/(.*)-(.*)-.*/\1 +\2/g' | sed 's/ +0$//')" RELEASE_DTS=$(TZ=UTC git show --quiet --date=format-local:"%Y%m%d%H%M" --format="%cd" HEAD) +BUILD_DATE="$(date "+%Y-%m-%d %H:%M")" MODULES=$(awk '/^[ \t]*#define LUA_USE_MODULES/{modules=modules sep tolower(substr($2,17));sep=","}END{if(length(modules)==0)modules="-";print modules}' $USER_MODULES_H | tr -d '\r') @@ -46,6 +47,7 @@ cat > $TEMPFILE << EndOfMessage #define BUILDINFO_RELEASE "$RELEASE" #define BUILDINFO_RELEASE_DTS "$RELEASE_DTS" #define BUILDINFO_MODULES "$MODULES" +#define BUILDINFO_BUILD_DATE "$BUILD_DATE" #define NODE_VERSION_LONG \\ USER_PROLOG "\n" \\