Skip to content

Commit

Permalink
add build_date to build info (#2888)
Browse files Browse the repository at this point in the history
  • Loading branch information
HHHartmann authored and marcelstoer committed Aug 15, 2019
1 parent 0b90495 commit 739b675
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/include/user_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down
2 changes: 2 additions & 0 deletions tools/update_buildinfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down Expand Up @@ -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" \\
Expand Down

0 comments on commit 739b675

Please sign in to comment.