From 4837d83a0bd98ff123293f18f02868cc021030e6 Mon Sep 17 00:00:00 2001 From: tingyuan Date: Mon, 25 Dec 2023 01:04:25 +0800 Subject: [PATCH] chore --- .github/workflows/test.yml | 2 +- scripts/build.mjs | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 85a846c2..0fa92d62 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: node-version: 18.x cache: npm - name: Install dependencies - run: npm install + run: npm install --force - name: Run test script run: npm test - name: Send failed message to wx diff --git a/scripts/build.mjs b/scripts/build.mjs index aaaa8447..eb0c43ef 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -45,7 +45,8 @@ await spinner('checking env...', async () => { assert.equal(d, 'OK', chalk.red('Can not access Expo Api')) }) - await $`npm ping && npm whoami --registry=https://registry.npmjs.org/` + await $`npm ping` + await $`npm whoami --registry=https://registry.npmjs.org/` await $`git ls-remote https://github.com/lovetingyuan/minibili.git` @@ -161,7 +162,12 @@ echo(chalk.blue('download apk file...')) try { await spinner('downloading apk file...', async () => { - await $`rm -rf apk && mkdir -p apk` + if (process.platform === 'win32') { + await $`rd /s /q apk` + await $`mkdir apk` + } else { + await $`rm -rf apk && mkdir -p apk` + } return retry( 3, () => $`wget ${apkUrl} -q -O ./apk/minibili-${newVersion}.apk`,