From 1e90545f040deb465e4b443dcabe9352a6aa8733 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 31 May 2022 15:50:21 +0800 Subject: [PATCH 1/5] =?UTF-8?q?:art:=20=E5=89=8D=E7=AB=AF=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20`pnpm`=20=E7=AE=A1=E7=90=86=E6=9E=84=E5=BB=BA=20htt?= =?UTF-8?q?ps://github.com/siyuan-note/siyuan/issues/5059?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bf34473af..b289cfc16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM node:16 as NODE_BUILD WORKDIR /go/src/github.com/siyuan-note/siyuan/ ADD . /go/src/github.com/siyuan-note/siyuan/ RUN rm /go/src/github.com/siyuan-note/siyuan/app/package-lock.json -RUN cd app && npm install --legacy-peer-deps && npm run build +RUN cd app && npm install -g pnpm && pnpm install && pnpm run build FROM golang:alpine as GO_BUILD WORKDIR /go/src/github.com/siyuan-note/siyuan/ From 8856884970786e54b10d1b202aed797d0e808b57 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 31 May 2022 15:52:35 +0800 Subject: [PATCH 2/5] =?UTF-8?q?:art:=20=E5=89=8D=E7=AB=AF=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20`pnpm`=20=E7=AE=A1=E7=90=86=E6=9E=84=E5=BB=BA=20htt?= =?UTF-8?q?ps://github.com/siyuan-note/siyuan/issues/5059?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa0c4036b..d00e80987 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -145,12 +145,16 @@ jobs: with: node-version: 16 + - name: Install Node pnpm + run: npm install -g pnpm + working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app + - name: Install Node Dependencies - run: npm install + run: pnpm install working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app - name: Building UI - run: npm run build + run: pnpm run build working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app - name: Remove Build Directory @@ -200,11 +204,11 @@ jobs: GOARCH: ${{ matrix.config.goarch }} - name: Building Electron - run: npm run ${{ matrix.config.electron_args }} + run: pnpm run ${{ matrix.config.electron_args }} working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app # - name: Build Appx - # run: npm install -g electron-windows-store && electron-windows-store --input-directory app\build\win-unpacked --output-directory app\build\ --package-version 1.0.0.0 --package-name SiYuan --manifest app\appx\AppxManifest.xml --assets app\appx\assets\ --make-pri true + # run: pnpm install -g electron-windows-store && electron-windows-store --input-directory app\build\win-unpacked --output-directory app\build\ --package-version 1.0.0.0 --package-name SiYuan --manifest app\appx\AppxManifest.xml --assets app\appx\assets\ --make-pri true # if: "contains( matrix.config.goos, 'windows')" # working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan From e9f0cc92c7afc5cf6e42a72a0d2a9187fa2be960 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 31 May 2022 15:54:37 +0800 Subject: [PATCH 3/5] =?UTF-8?q?:art:=20=E5=89=8D=E7=AB=AF=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20`pnpm`=20=E7=AE=A1=E7=90=86=E6=9E=84=E5=BB=BA=20htt?= =?UTF-8?q?ps://github.com/siyuan-note/siyuan/issues/5059?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DEV.md | 2 +- DEV_zh_CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEV.md b/DEV.md index b5dad6d93..d81d56b1c 100644 --- a/DEV.md +++ b/DEV.md @@ -18,7 +18,7 @@ In China, it may be necessary to set the Electron mirror environment variable: NPM mirror: -* May need to use mirror repository in China `pnpm --registry https://r.cnpmjs.org/ i -D --sass_binary_site=https://cnpmjs.org/mirrors/node-sass/` +* May need to use mirror repository in China `pnpm --registry https://r.cnpmjs.org/ i` * Revert to using official repository `pnpm --registry https://registry.npmjs.org i` ## Kernel diff --git a/DEV_zh_CN.md b/DEV_zh_CN.md index 91d65d901..d057922dd 100644 --- a/DEV_zh_CN.md +++ b/DEV_zh_CN.md @@ -18,7 +18,7 @@ NPM 镜像: -* 在中国可能需要使用镜像仓库 `pnpm --registry https://r.cnpmjs.org/ i -D --sass_binary_site=https://cnpmjs.org/mirrors/node-sass/` +* 在中国可能需要使用镜像仓库 `pnpm --registry https://r.cnpmjs.org/ i` * 恢复使用官方仓库 `pnpm --registry https://registry.npmjs.org i` ## 内核 From 815128bd5343ccd8c38480faee63ea9db3e938ee Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 31 May 2022 16:56:09 +0800 Subject: [PATCH 4/5] =?UTF-8?q?:octocat:=20=E6=9E=84=E5=BB=BA=E6=97=B6?= =?UTF-8?q?=E6=B3=A8=E5=85=A5=E8=BF=90=E8=A1=8C=E6=A8=A1=E5=BC=8F=E4=B8=BA?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=A8=A1=E5=BC=8F=20`prod`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d00e80987..ad5cd56b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,35 +62,35 @@ jobs: config: - os: ubuntu-20.04 kernel_path: "../app/kernel-linux/SiYuan-Kernel" - build_args: "-s -w" + build_args: "-s -w -X github.com/siyuan-note/siyuan/kernel/util.Mode=prod" electron_args: "dist-linux" goos: "linux" goarch: "amd64" suffix: "linux.AppImage" - os: ubuntu-20.04 kernel_path: "../app/kernel-linux/SiYuan-Kernel" - build_args: "-s -w" + build_args: "-s -w -X github.com/siyuan-note/siyuan/kernel/util.Mode=prod" electron_args: "dist-linux" goos: "linux" goarch: "amd64" suffix: "linux.tar.gz" - os: macos-latest kernel_path: "../app/kernel-darwin/SiYuan-Kernel" - build_args: "-s -w" + build_args: "-s -w -X github.com/siyuan-note/siyuan/kernel/util.Mode=prod" electron_args: "dist-darwin" goos: "darwin" goarch: "amd64" suffix: "mac.dmg" - os: macos-latest kernel_path: "../app/kernel-darwin-arm64/SiYuan-Kernel" - build_args: "-s -w" + build_args: "-s -w -X github.com/siyuan-note/siyuan/kernel/util.Mode=prod" electron_args: "dist-darwin-arm64" goos: "darwin" goarch: "arm64" suffix: "mac-arm64.dmg" - os: windows-2019 kernel_path: "../app/kernel/SiYuan-Kernel.exe" - build_args: "-s -w -H=windowsgui" + build_args: "-s -w -H=windowsgui -X github.com/siyuan-note/siyuan/kernel/util.Mode=prod" electron_args: "dist" goos: "windows" gobin: "bin" @@ -99,7 +99,7 @@ jobs: suffix: "win.exe" - os: windows-2019 kernel_path: "../app/kernel32/SiYuan-Kernel.exe" - build_args: "-s -w -H=windowsgui" + build_args: "-s -w -H=windowsgui -X github.com/siyuan-note/siyuan/kernel/util.Mode=prod" electron_args: "dist-win32" goos: "windows" mingwsys: "MINGW32" From 08f4be119fb0c0317e71aed4bbad88bde678934f Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 31 May 2022 17:31:19 +0800 Subject: [PATCH 5/5] =?UTF-8?q?:octocat:=20=E5=88=A0=E6=8E=89=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E6=B3=A8=E9=87=8A=E7=9A=84=20appx=20=E6=89=93?= =?UTF-8?q?=E5=8C=85=EF=BC=8C=E5=95=86=E5=BA=97=E7=89=88=E6=89=93=E5=8C=85?= =?UTF-8?q?=E4=BB=85=E5=9C=A8=E5=8F=91=E5=B8=83=E6=AD=A3=E5=BC=8F=E7=89=88?= =?UTF-8?q?=E6=97=B6=E8=80=83=E8=99=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad5cd56b9..6aaa5ea28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -207,11 +207,6 @@ jobs: run: pnpm run ${{ matrix.config.electron_args }} working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan/app - # - name: Build Appx - # run: pnpm install -g electron-windows-store && electron-windows-store --input-directory app\build\win-unpacked --output-directory app\build\ --package-version 1.0.0.0 --package-name SiYuan --manifest app\appx\AppxManifest.xml --assets app\appx\assets\ --make-pri true - # if: "contains( matrix.config.goos, 'windows')" - # working-directory: ${{ github.workspace }}/go/src/github.com/siyuan-note/siyuan - - name: Upload Release uses: actions/upload-release-asset@v1 env: