Skip to content

Commit

Permalink
fix: industry product uniform -V
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanKuanJun committed Jun 6, 2024
1 parent a6b1a12 commit c972a48
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ IF(GIT_FOUND)
IF ("${TAOSDUMP_COMMIT_SHA1}" STREQUAL "")
SET(TAOSDUMP_COMMIT_SHA1 "unknown")
ELSE ()
STRING(SUBSTRING "${TAOSDUMP_COMMIT_SHA1}" 0 7 TAOSDUMP_COMMIT_SHA1)
STRING(STRIP "${TAOSDUMP_COMMIT_SHA1}" TAOSDUMP_COMMIT_SHA1)
ENDIF ()
IF ("${TAOSDUMP_TAG}" STREQUAL "")
Expand All @@ -139,7 +138,6 @@ IF(GIT_FOUND)
IF ("${TAOSBENCHMARK_COMMIT_SHA1}" STREQUAL "")
SET(TAOSBENCHMARK_COMMIT_SHA1 "unknown")
ELSE ()
STRING(SUBSTRING "${TAOSBENCHMARK_COMMIT_SHA1}" 0 7 TAOSBENCHMARK_COMMIT_SHA1)
STRING(STRIP "${TAOSBENCHMARK_COMMIT_SHA1}" TAOSBENCHMARK_COMMIT_SHA1)
ENDIF ()
IF ("${TAOSBENCHMARK_TAG}" STREQUAL "")
Expand Down
6 changes: 5 additions & 1 deletion src/benchCommandOpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ extern char g_configDir[MAX_PATH_LEN];
#define TAOSBENCHMARK_STATUS "unknown"
#endif

#ifndef TD_PRODUCT_NAME
#define TD_PRODUCT_NAME "TDengine"
#endif

// libtaos.so
extern char buildinfo[];

Expand All @@ -48,7 +52,7 @@ void printVersion() {
char taosBenchmark_status[] = TAOSBENCHMARK_STATUS;

// version
printf("version: %s\ngitinfo: %s\n", taosBenchmark_ver, taosBenchmark_commit);
printf("%s\ntaosBenchmark version: %s\ngit: %s\n", TD_PRODUCT_NAME, taosBenchmark_ver, taosBenchmark_commit);
#ifdef LINUX
printf("buildInfo: %s\n ", buildinfo);
#endif
Expand Down
5 changes: 4 additions & 1 deletion src/taosdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@
#define TAOSDUMP_STATUS "unknown"
#endif

#ifndef TD_PRODUCT_NAME
#define TD_PRODUCT_NAME "TDengine"
#endif

// use 256 as normal buffer length
#define BUFFER_LEN 256
Expand Down Expand Up @@ -670,7 +673,7 @@ static void printVersion(FILE *file) {

char taosdump_commit[] = TAOSDUMP_COMMIT_SHA1;

fprintf(file,"version: %s\ngitinfo: %s\n", taostools_ver, taosdump_commit);
fprintf(file,"%s\ntaosdump version: %s\ngit: %s\n", TD_PRODUCT_NAME, taostools_ver, taosdump_commit);
#ifdef LINUX
printf("buildInfo: %s\n ", buildinfo);
#endif
Expand Down

0 comments on commit c972a48

Please sign in to comment.