From 175b5283c27ba933556cbc3d57664921fe57a03e Mon Sep 17 00:00:00 2001 From: caorushizi <84996057@qq.com> Date: Fri, 4 Oct 2024 16:10:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=20merge=20video?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cspell/custom-words.txt | 1 + Dockerfile | 2 +- package.json | 2 +- packages/backend/scripts/index.ts | 11 ++++++++++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.cspell/custom-words.txt b/.cspell/custom-words.txt index 4344e9b2..d5633b1f 100644 --- a/.cspell/custom-words.txt +++ b/.cspell/custom-words.txt @@ -1,6 +1,7 @@ acodec adblocker ahooks +aliyuncs antd aplus behaviour diff --git a/Dockerfile b/Dockerfile index 3f411171..9838bf8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ WORKDIR /app COPY --from=builder /app /app # COPY --from=deb_extractor /dpkg / -RUN apt-get update && apt-get install -y libicu-dev +RUN apt-get update && apt-get install -y libicu-dev ffmpeg RUN npm install pm2 -g diff --git a/package.json b/package.json index 1a70ef2b..6e2df7e2 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build:renderer": "pnpm -F renderer run build", "build:mobile": "pnpm -F mobile run build", "build:docker": "tsx scripts/web.ts && docker buildx build -t caorushizi/mediago:latest .", - "rebuild:web": "pnpm -F renderer run rebuild", + "rebuild:web": "pnpm -F backend rebuild", "rebuild:electron": "pnpm -F main run rebuild", "beta": "pnpm run build && pnpm -F mediago run pack", "release": "pnpm run build && pnpm -F main run release", diff --git a/packages/backend/scripts/index.ts b/packages/backend/scripts/index.ts index 87905e06..14eda89c 100644 --- a/packages/backend/scripts/index.ts +++ b/packages/backend/scripts/index.ts @@ -21,7 +21,16 @@ async function buildClean() { async function copyBin() { const source = mainResolve("../main/bin", isDev ? process.platform : "linux"); const target = mainResolve("dist/server/bin"); - fs.cpSync(source, target, { recursive: true }); + fs.cpSync(source, target, { + recursive: true, + filter: (src) => { + if (!isDev && src.endsWith("ffmpeg")) { + return false; + } + + return true; + }, + }); } const copy = gulp.parallel(copyBin);