Skip to content

Commit e404760

Browse files
JasonChenCJlijinxia
authored andcommitted
add RC_VERSION for dm
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
1 parent 2cb8ce5 commit e404760

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

devicemodel/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
MAJOR_VERSION=0
55
MINOR_VERSION=1
6+
RC_VERSION=1
67
BASEDIR := $(shell pwd)
78
DM_OBJDIR ?= $(CURDIR)/build
89

@@ -111,6 +112,7 @@ include/version.h:
111112
cat license_header > include/version.h;\
112113
echo "#define DM_MAJOR_VERSION $(MAJOR_VERSION)" >> include/version.h;\
113114
echo "#define DM_MINOR_VERSION $(MINOR_VERSION)" >> include/version.h;\
115+
echo "#define DM_RC_VERSION $(RC_VERSION)" >> include/version.h;\
114116
echo "#define DM_BUILD_VERSION "\""$$PATCH"\""" >> include/version.h;\
115117
echo "#define DM_BUILD_TIME "\""$$TIME"\""" >> include/version.h;\
116118
echo "#define DM_BUILD_USER "\""$(USER)"\""" >> include/version.h

devicemodel/core/main.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,14 @@ usage(int code)
160160
static void
161161
print_version(void)
162162
{
163-
fprintf(stderr, "DM version is: %d.%d-%s, build by %s@%s\n",
164-
DM_MAJOR_VERSION, DM_MINOR_VERSION, DM_BUILD_VERSION,
165-
DM_BUILD_USER, DM_BUILD_TIME);
163+
if (DM_RC_VERSION)
164+
fprintf(stderr, "DM version is: %d.%d-%d-%s, build by %s@%s\n",
165+
DM_MAJOR_VERSION, DM_MINOR_VERSION, DM_RC_VERSION,
166+
DM_BUILD_VERSION, DM_BUILD_USER, DM_BUILD_TIME);
167+
else
168+
fprintf(stderr, "DM version is: %d.%d-%s, build by %s@%s\n",
169+
DM_MAJOR_VERSION, DM_MINOR_VERSION, DM_BUILD_VERSION,
170+
DM_BUILD_USER, DM_BUILD_TIME);
166171

167172
exit(0);
168173
}

0 commit comments

Comments
 (0)