Skip to content

Commit

Permalink
Merge pull request #750 from taosdata/feat/TD-30458
Browse files Browse the repository at this point in the history
fix: industry product uniform -V
  • Loading branch information
DuanKuanJun committed Jun 6, 2024
2 parents a6b1a12 + 1933190 commit b12e18d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ 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(SUBSTRING "${TAOSDUMP_COMMIT_SHA1}" 0 40 TAOSDUMP_COMMIT_SHA1)
STRING(STRIP "${TAOSDUMP_COMMIT_SHA1}" TAOSDUMP_COMMIT_SHA1)
ENDIF ()
IF ("${TAOSDUMP_TAG}" STREQUAL "")
Expand All @@ -139,7 +139,7 @@ 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(SUBSTRING "${TAOSBENCHMARK_COMMIT_SHA1}" 0 40 TAOSBENCHMARK_COMMIT_SHA1)
STRING(STRIP "${TAOSBENCHMARK_COMMIT_SHA1}" TAOSBENCHMARK_COMMIT_SHA1)
ENDIF ()
IF ("${TAOSBENCHMARK_TAG}" STREQUAL "")
Expand Down
8 changes: 6 additions & 2 deletions 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,9 +52,9 @@ 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);
printf("build: %s\n ", buildinfo);
#endif
if (strlen(taosBenchmark_status) > 0) {
printf("status: %s\n", taosBenchmark_status);
Expand Down
7 changes: 5 additions & 2 deletions 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,9 +673,9 @@ 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);
printf("build: %s\n ", buildinfo);
#endif
if (strlen(taosdump_status) > 0) {
fprintf(file, "status:%s\n", taosdump_status);
Expand Down

0 comments on commit b12e18d

Please sign in to comment.