feat(grant): support industry edition
This commit is contained in:
parent
c632a64294
commit
585ec14fea
|
@ -11,8 +11,8 @@ ELSE ()
|
|||
SET(TD_VER_COMPATIBLE "3.0.0.0")
|
||||
ENDIF ()
|
||||
|
||||
IF (TD_EDITION_NAME)
|
||||
ADD_DEFINITIONS(-DTD_EDITION_NAME="${TD_EDITION_NAME}")
|
||||
IF (TD_PRODUCT_NAME)
|
||||
ADD_DEFINITIONS(-DTD_PRODUCT_NAME="${TD_PRODUCT_NAME}")
|
||||
ENDIF ()
|
||||
|
||||
find_program(HAVE_GIT NAMES git)
|
||||
|
|
|
@ -78,11 +78,11 @@ extern const int32_t TYPE_BYTES[21];
|
|||
#define TSDB_DEFAULT_PASS "taosdata"
|
||||
#endif
|
||||
|
||||
#ifndef TD_EDITION_NAME
|
||||
#ifndef TD_PRODUCT_NAME
|
||||
#ifdef TD_ENTERPRISE
|
||||
#define TD_EDITION_NAME "TDengine Enterprise Edition"
|
||||
#define TD_PRODUCT_NAME "TDengine Enterprise Edition"
|
||||
#else
|
||||
#define TD_EDITION_NAME "TDengine Community Edition"
|
||||
#define TD_PRODUCT_NAME "TDengine Community Edition"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -258,12 +258,12 @@ static void dmPrintArgs(int32_t argc, char const *argv[]) {
|
|||
static void dmGenerateGrant() { mndGenerateMachineCode(); }
|
||||
|
||||
static void dmPrintVersion() {
|
||||
printf("%s: %s compatible_version: %s\n", TD_EDITION_NAME, version, compatible_version);
|
||||
printf("gitinfo: %s\n", gitinfo);
|
||||
printf("%s\ntaosd version: %s compatible_version: %s\n", TD_PRODUCT_NAME, version, compatible_version);
|
||||
printf("git: %s\n", gitinfo);
|
||||
#ifdef TD_ENTERPRISE
|
||||
printf("gitinfoOfInternal: %s\n", gitinfoOfInternal);
|
||||
printf("git: %s\n", gitinfoOfInternal);
|
||||
#endif
|
||||
printf("buildInfo: %s\n", buildinfo);
|
||||
printf("build: %s\n", buildinfo);
|
||||
}
|
||||
|
||||
static void dmPrintHelp() {
|
||||
|
|
|
@ -36,7 +36,7 @@ static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl
|
|||
if (pShow->numOfRows < 1) {
|
||||
cols = 0;
|
||||
SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
|
||||
STR_WITH_MAXSIZE_TO_VARSTR(tmp, TD_EDITION_NAME, 32);
|
||||
STR_WITH_MAXSIZE_TO_VARSTR(tmp, TD_PRODUCT_NAME, 32);
|
||||
colDataSetVal(pColInfo, numOfRows, tmp, false);
|
||||
|
||||
GRANT_ITEM_SHOW("unlimited");
|
||||
|
|
|
@ -1242,14 +1242,9 @@ static int32_t udfdParseArgs(int32_t argc, char *argv[]) {
|
|||
}
|
||||
|
||||
static void udfdPrintVersion() {
|
||||
#ifdef TD_ENTERPRISE
|
||||
char *releaseName = "enterprise";
|
||||
#else
|
||||
char *releaseName = "community";
|
||||
#endif
|
||||
printf("%s version: %s compatible_version: %s\n", releaseName, version, compatible_version);
|
||||
printf("gitinfo: %s\n", gitinfo);
|
||||
printf("buildInfo: %s\n", buildinfo);
|
||||
printf("udfd version: %s compatible_version: %s\n", version, compatible_version);
|
||||
printf("git: %s\n", gitinfo);
|
||||
printf("build: %s\n", buildinfo);
|
||||
}
|
||||
|
||||
static int32_t udfdInitLog() {
|
||||
|
|
|
@ -2,6 +2,6 @@ char version[64] = "${TD_VER_NUMBER}";
|
|||
char compatible_version[12] = "${TD_VER_COMPATIBLE}";
|
||||
char gitinfo[48] = "${TD_VER_GIT}";
|
||||
char gitinfoOfInternal[48] = "${TD_VER_GIT_INTERNAL}";
|
||||
char buildinfo[64] = "Built ${TD_VER_OSTYPE}-${TD_VER_CPUTYPE} at ${TD_VER_DATE}";
|
||||
char buildinfo[64] = "${TD_VER_OSTYPE}-${TD_VER_CPUTYPE} ${TD_VER_DATE}";
|
||||
|
||||
void libtaos_${TD_LIB_VER_NUMBER}_${TD_VER_OSTYPE}_${TD_VER_CPUTYPE}_${TD_VER_VERTYPE}() {};
|
||||
|
|
|
@ -435,11 +435,12 @@ int32_t shellParseArgs(int32_t argc, char *argv[]) {
|
|||
shell.info.promptSize = strlen(shell.info.promptHeader);
|
||||
#ifdef TD_ENTERPRISE
|
||||
snprintf(shell.info.programVersion, sizeof(shell.info.programVersion),
|
||||
"%s: %s compatible_version: %s\ngitinfo: %s\ngitinfoOfInternal: %s\nbuildInfo: %s", TD_EDITION_NAME, version,
|
||||
"%s\ntaos version: %s compatible_version: %s\ngit: %s\ngit: %s\nbuild: %s", TD_PRODUCT_NAME, version,
|
||||
compatible_version, gitinfo, gitinfoOfInternal, buildinfo);
|
||||
#else
|
||||
snprintf(shell.info.programVersion, sizeof(shell.info.programVersion),
|
||||
"%s: %s compatible_version: %s\ngitinfo: %s\nbuildInfo: %s", TD_EDITION_NAME, version, compatible_version, gitinfo, buildinfo);
|
||||
"%s\ntaos version: %s compatible_version: %s\ngit: %s\nbuild: %s", TD_PRODUCT_NAME, version,
|
||||
compatible_version, gitinfo, buildinfo);
|
||||
#endif
|
||||
|
||||
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
|
||||
|
|
Loading…
Reference in New Issue