Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
lovetingyuan committed Dec 29, 2023
1 parent 2be63c8 commit 6f13bff
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,12 @@ try {
} else {
await $`rm -rf apk && mkdir -p apk`
}
return retry(
3,
() => $`wget ${apkUrl} -q -O ./apk/minibili-${newVersion}.apk`,
)
return retry(3, () => {
if (process.platform === 'win32') {
return $`certutil -urlcache -split -f ${apkUrl} ./apk/minibili-${newVersion}.apk`
}
return $`wget ${apkUrl} -q -O ./apk/minibili-${newVersion}.apk`
})
})
echo(chalk.blue(`Saved apk to ./apk/minibili-${newVersion}.apk`))
try {
Expand Down Expand Up @@ -232,9 +234,13 @@ try {
}

if (process.platform === 'win32') {
await $`start https://github.com/lovetingyuan/minibili/releases/new?tag=v${newVersion}&title=minibili-${newVersion}&body=${changes}`
await $`start https://github.com/lovetingyuan/minibili/releases/new?tag=v${newVersion}&title=minibili-${newVersion}&body=${encodeURIComponent(
changes,
)}`
} else {
await $`open https://github.com/lovetingyuan/minibili/releases/new?tag=v${newVersion}&title=minibili-${newVersion}&body=${changes}`
await $`open https://github.com/lovetingyuan/minibili/releases/new?tag=v${newVersion}&title=minibili-${newVersion}&body=${encodeURIComponent(
changes,
)}`
}

echo(chalk.green('Build done!'))

0 comments on commit 6f13bff

Please sign in to comment.