Skip to content

Commit 0864fed

Browse files
authored
Merge pull request OtterMind#1153 from chat2db/dev
Dev
2 parents e707d64 + 6f96808 commit 0864fed

118 files changed

Lines changed: 3766 additions & 923 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,13 @@ jobs:
137137
- name: Yarn install & build & copy
138138
run: |
139139
cd chat2db-client
140-
yarn install
140+
yarn
141141
yarn run build:web:prod --app_version=${{ steps.chat2db_version.outputs.substring }}
142142
cp -r dist ../chat2db-server/chat2db-server-start/src/main/resources/static/front
143143
cp -r dist/index.html ../chat2db-server/chat2db-server-start/src/main/resources/thymeleaf/
144+
cd src/main
145+
yarn
146+
yarn run build
144147
145148
# 编译服务端java版本
146149
- name: Build Java

.github/workflows/release_test.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ jobs:
1717
build_arg: "--win --x64"
1818
- os: macos-latest
1919
arch: x86_64
20-
file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.dmg"
20+
file_name: "https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.dmg"
2121
file_extension: ".dmg"
2222
build_arg: "--mac --x64"
2323
- os: macos-latest
2424
arch: arm64
25-
file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test-arm64.dmg"
25+
file_name: "https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test-arm64.dmg"
2626
file_extension: ".dmg"
2727
build_arg: "--mac --arm64"
2828
- os: ubuntu-latest
29-
file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.AppImage"
29+
file_name: "https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.AppImage"
3030
file_extension: ".AppImage"
3131
build_arg: "--linux"
3232
runs-on: ${{ matrix.os }}
@@ -100,10 +100,14 @@ jobs:
100100
- name: Build FE Static
101101
run: |
102102
cd chat2db-client
103-
yarn install --frozen-lockfile
103+
yarn
104104
yarn run build:web:prod --app_version=99.0.${{ github.run_id }} --app_port=10822
105105
cp -r dist ../chat2db-server/chat2db-server-start/src/main/resources/static/front
106106
cp -r dist/index.html ../chat2db-server/chat2db-server-start/src/main/resources/thymeleaf/
107+
cd src/main
108+
yarn
109+
yarn run build
110+
107111
108112
# 打包后端工程 & 发送到前端
109113
- name: Build BE Static
@@ -188,6 +192,22 @@ jobs:
188192
run: |
189193
ossutil cp -rf --acl=public-read ./oss_temp_file/ oss://chat2db-client/test/99.0.${{ github.run_id }}/
190194
195+
# 配置SSH 待上传到服务器
196+
- name: Install ssh key
197+
run: |
198+
mkdir -p ~/.ssh
199+
echo "${{ secrets.SERVER_DOWNLOAD_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
200+
chmod 600 ~/.ssh/id_rsa
201+
ssh-keyscan -t rsa ${{ secrets.SERVER_DOWNLOAD_HOST }} >> ~/.ssh/known_hosts
202+
eval `ssh-agent -s`
203+
ssh-add ~/.ssh/id_rsa
204+
# 上传到服务器
205+
- name: Upload package
206+
run: |
207+
ssh -t ${{ secrets.SERVER_DOWNLOAD_USERNAME }}@${{ secrets.SERVER_DOWNLOAD_HOST }} "mkdir -p ${{ secrets.SERVER_DOWNLOAD_PATH }}/test//99.0.${{ github.run_id }}"
208+
scp ./oss_temp_file/* ${{ secrets.SERVER_DOWNLOAD_USERNAME }}@${{ secrets.SERVER_DOWNLOAD_HOST }}:${{ secrets.SERVER_DOWNLOAD_PATH }}/test//99.0.${{ github.run_id }}/
209+
210+
191211
# 发送到DingTalk
192212
- name: Send dingtalk message
193213
uses: ghostoy/dingtalk-action@master
@@ -197,7 +217,7 @@ jobs:
197217
content: |
198218
{
199219
"title": "${{ matrix.os }}-test-打包完成通知",
200-
"text": "# ${{ matrix.os }}-test-打包完成通知\n ![bang](https://oss.sqlgpt.cn/static/bang100.gif)\n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }})\n ### 下载地址:[${{matrix.file_name}}](${{matrix.file_name}})"
220+
"text": "# ${{ matrix.os }}-test-打包完成通知\n !\n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }})\n ### 下载地址:[${{matrix.file_name}}](${{matrix.file_name}})"
201221
}
202222
203223
# 发送Jar包地址到DingTalk
@@ -210,5 +230,5 @@ jobs:
210230
content: |
211231
{
212232
"title": "Jar-test-构建完成通知",
213-
"text": "### jar包下载地址:[https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/chat2db-server-start.zip](https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/chat2db-server-start.zip) "
233+
"text": "### jar包下载地址:[https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/chat2db-server-start.zip](https://download.sqlgpt.cn/test/99.0.${{ github.run_id }}/chat2db-server-start.zip) "
214234
}

.github/workflows/release_test_2.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,13 @@ jobs:
100100
- name: Build FE Static
101101
run: |
102102
cd chat2db-client
103-
yarn install --frozen-lockfile
103+
yarn
104104
yarn run build:web:prod --app_version=99.0.${{ github.run_id }} --app_port=10822
105105
cp -r dist ../chat2db-server/chat2db-server-start/src/main/resources/static/front
106106
cp -r dist/index.html ../chat2db-server/chat2db-server-start/src/main/resources/thymeleaf/
107+
cd src/main
108+
yarn
109+
yarn run build
107110
108111
# 打包后端工程 & 发送到前端
109112
- name: Build BE Static

chat2db-client/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
/src/.umi
66
/src/.umi-production
77
/src/.umi-test
8+
/src/main/node_modules
9+
/src/main/dist
810
/dist
911
.swc
1012
./yarn-error.log

chat2db-client/.umirc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export default defineConfig({
8383
localStorage.clear();
8484
localStorage.setItem('app-local-storage-versions', 'v4');
8585
}`,
86-
`if (window.electronApi) { window.electronApi.startServerForSpawn() }`,
86+
// `if (window.electronApi) { window.electronApi.startServerForSpawn() }`,
8787
// `if ("serviceWorker" in navigator) {
8888
// window.addEventListener("load", function () {
8989
// navigator.serviceWorker

chat2db-client/package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/chat2db/Chat2DB"
88
},
99
"author": "fjy, hexi",
10-
"main": "src/main/index.js",
10+
"main": "src/main/main.js",
1111
"scripts": {
1212
"build": "npm run build:web && npm run build:main",
1313
"build:desktop": "npm run build:web:desktop && npm run build:main:prod",
@@ -33,15 +33,13 @@
3333
"copy-to-clipboard": "^3.3.3",
3434
"echarts": "^5.4.2",
3535
"echarts-for-react": "^3.0.2",
36-
"electron-log": "^4.4.8",
3736
"event-source-polyfill": "^1.0.31",
3837
"highlight.js": "^11.9.0",
3938
"lodash": "^4.17.21",
4039
"markdown-it-link-attributes": "^4.0.1",
4140
"monaco-editor": "^0.44.0",
4241
"monaco-editor-esm-webpack-plugin": "^2.1.0",
4342
"monaco-editor-webpack-plugin": "^7.0.1",
44-
"node-machine-id": "^1.1.12",
4543
"react-monaco-editor": "^0.54.0",
4644
"react-sortablejs": "^6.1.4",
4745
"sql-formatter": "^13.0.4",
@@ -65,7 +63,6 @@
6563
"electron": "^22.3.0",
6664
"electron-builder": "^23.6.0",
6765
"electron-debug": "^3.2.0",
68-
"electron-reload": "^2.0.0-alpha.1",
6966
"eslint": "^8.49.0",
7067
"eslint-config-airbnb-base": "^15.0.0",
7168
"eslint-config-prettier": "^9.0.0",
@@ -98,14 +95,11 @@
9895
"asar": false,
9996
"files": [
10097
"dist/**/*",
101-
"static/",
10298
"src/main",
99+
"static/",
103100
"versions/**/*",
104101
"package.json",
105-
"!node_modules/**/*",
106-
"node_modules/uuid",
107-
"node_modules/electron-log",
108-
"node_modules/node-machine-id"
102+
"!node_modules/**/*"
109103
],
110104
"nsis": {
111105
"oneClick": false,
40.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)