From 3591c73d6e11081285366c52b19f0e2db50b29aa Mon Sep 17 00:00:00 2001 From: Beacontownfc <1963697267@qq.com> Date: Sat, 18 Jun 2022 23:00:31 +0800 Subject: [PATCH 1/3] add console compilation verification --- community/how-to-verify.md | 40 ++++++++++++++++++- .../current/how-to-verify.md | 40 ++++++++++++++++++- 2 files changed, 78 insertions(+), 2 deletions(-) diff --git a/community/how-to-verify.md b/community/how-to-verify.md index ec7f2c3d292..0089be3aa3f 100644 --- a/community/how-to-verify.md +++ b/community/how-to-verify.md @@ -156,7 +156,45 @@ $ mvnw.cmd -N install #If the performance of the machine where the compilation is located is relatively poor, this process will be time-consuming, usually about 30min $ mvnw.cmd clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true ```` -#### 2.4.3 Check related compliance items +#### 2.4.3 Console code compilation verification +First check the files: web/package.json,web/.env, check whether the console version is correct +The execute the following command to install package +```shell +npm install +``` +Next, build the project: +```shell +npm run build +``` +The console installation package `apache-linkis-${version}-incubating-web-bin.tar.gz` will be generated after the above command is successfully executed + +:::caution: +1.An error occured when running `npm install`: + +`Error: Can't find Python executable "python", you can set the PYTHON env variable` + +You can install the windows-build-tools (This requires administractor privileges) +```shell +$ npm install --global --production windows-build-tools +``` +Install the node-gyp: +```shell +$ npm install --global node-gyp +``` +2.If compilation fails, please clean up and re-execute as follows: +```shell +#Delete node_modules +$ rm -rf node_modules +#Delete package-lock.json +$ rm -rf package-lock.json +#Clean npm cache +$ npm cache clear --force +#Download package again +$ npm install + +``` +::: +#### 2.4.4 Check related compliance items and check as follows: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-verify.md b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-verify.md index d3deecf35fb..5cc2aa3b309 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-verify.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-verify.md @@ -156,7 +156,45 @@ $ mvnw.cmd -N install #如果编译所在的机器性能比较差,则此过程会比较耗时,一般耗时30min左右 $ mvnw.cmd clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true ``` -#### 2.4.3 相关合规项检查 + +#### 2.4.3 管理台代码编译验证 +首先检查web/package.json,web/.env文件,检查前端管理台版本号是否正确 +随后执行如下代码安装依赖: +```shell +npm install +``` +接下来项目进行打包: +```shell +npm run build +``` +上述命令执行成功后,会生成前端管理台安装包: `apache-linkis-${version}-incubating-web-bin.tar.gz` + +:::caution 注意: +1.Windows下`npm install`步骤报错: +`Error: Can't find Python executable "python", you can set the PYTHON env variable` + +安装windows-build-tools (管理员权限): +```shell +$ npm install --global --production windows-build-tools +``` +安装node-gyp: +``` +$ npm install --global node-gyp +``` +2.如果编译失败 请按如下步骤清理后重新执行 +```shell +#进入项目工作目录,删除 node_modules +$ rm -rf node_modules +#删除 package-lock.json +$ rm -rf package-lock.json +#清除 npm 缓存 +$ npm cache clear --force +#重新下载依赖 +$ npm install + +``` +::: +#### 2.4.4 相关合规项检查 进行如下检查: From a05261f112e4c0b34a64094bed719d85ebf3596d Mon Sep 17 00:00:00 2001 From: Beacontownfc <1963697267@qq.com> Date: Wed, 22 Jun 2022 08:39:03 +0800 Subject: [PATCH 2/3] optimize some compilation docs --- .../current/how-to-verify.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-verify.md b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-verify.md index 5cc2aa3b309..55f203504f4 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-verify.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-verify.md @@ -142,14 +142,13 @@ Archives: 0 -#### 2.4.2 源码编译验证 +#### 2.4.2 项目源码编译验证 Mac OS/Linux ```shell $ ./mvnw -N install #如果编译所在的机器性能比较差,则此过程会比较耗时,一般耗时30min左右 $ ./mvnw clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true ``` - Window ```shell $ mvnw.cmd -N install @@ -157,9 +156,11 @@ $ mvnw.cmd -N install $ mvnw.cmd clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true ``` -#### 2.4.3 管理台代码编译验证 -首先检查web/package.json,web/.env文件,检查前端管理台版本号是否正确 -随后执行如下代码安装依赖: +#### 2.4.3 web源码编译验证 + +>需要依赖node.js环境,建议使用node v14版本 + +安装依赖: ```shell npm install ``` @@ -167,12 +168,10 @@ npm install ```shell npm run build ``` -上述命令执行成功后,会生成前端管理台安装包: `apache-linkis-${version}-incubating-web-bin.tar.gz` :::caution 注意: 1.Windows下`npm install`步骤报错: `Error: Can't find Python executable "python", you can set the PYTHON env variable` - 安装windows-build-tools (管理员权限): ```shell $ npm install --global --production windows-build-tools @@ -191,9 +190,8 @@ $ rm -rf package-lock.json $ npm cache clear --force #重新下载依赖 $ npm install - ``` -::: +::: #### 2.4.4 相关合规项检查 进行如下检查: From 3067c0d1c621407a17afe289bb62e99509bc0e63 Mon Sep 17 00:00:00 2001 From: Beacontownfc <1963697267@qq.com> Date: Thu, 23 Jun 2022 08:15:21 +0800 Subject: [PATCH 3/3] modify English doc --- community/how-to-verify.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/community/how-to-verify.md b/community/how-to-verify.md index 0089be3aa3f..4d1139c457e 100644 --- a/community/how-to-verify.md +++ b/community/how-to-verify.md @@ -143,7 +143,7 @@ If it is not 0, you need to confirm whether the source code has the license for -#### 2.4.2 Source code compilation verification +#### 2.4.2 Project source code compilation verification Mac OS/Linux ```shell $ ./mvnw -N install @@ -156,9 +156,10 @@ $ mvnw.cmd -N install #If the performance of the machine where the compilation is located is relatively poor, this process will be time-consuming, usually about 30min $ mvnw.cmd clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true ```` -#### 2.4.3 Console code compilation verification -First check the files: web/package.json,web/.env, check whether the console version is correct -The execute the following command to install package +#### 2.4.3 Web source code compilation verification +> This will require node.js environment. It is recommended to use node v14 version. + +First, install the packages: ```shell npm install ``` @@ -168,7 +169,7 @@ npm run build ``` The console installation package `apache-linkis-${version}-incubating-web-bin.tar.gz` will be generated after the above command is successfully executed -:::caution: +:::caution 1.An error occured when running `npm install`: `Error: Can't find Python executable "python", you can set the PYTHON env variable` @@ -189,7 +190,7 @@ $ rm -rf node_modules $ rm -rf package-lock.json #Clean npm cache $ npm cache clear --force -#Download package again +#Download packages again $ npm install ```