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

Add console compilation verification #358

Merged
merged 3 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
40 changes: 39 additions & 1 deletion community/how-to-verify.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

en docs need to modify together

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,57 @@ Archives: 0
</font>


#### 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
#如果编译所在的机器性能比较差,则此过程会比较耗时,一般耗时30min左右
$ mvnw.cmd clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true
```
#### 2.4.3 相关合规项检查

#### 2.4.3 web源码编译验证

>需要依赖node.js环境,建议使用node v14版本

安装依赖:
```shell
npm install
```
接下来项目进行打包:
```shell
npm run build
```

:::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 相关合规项检查

进行如下检查:

Expand Down