Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: industry product uniform -V #750

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading