打包命令

This commit is contained in:
xiangheng
2023-11-29 00:38:06 +08:00
parent 22daf15440
commit 006d09707c
2 changed files with 9 additions and 1 deletions

View File

@@ -8,7 +8,15 @@ const releaseRelativePath = '../frontend'
const distPath = path.resolve(cwd, 'dist')
const releasePath = path.resolve(cwd, releaseRelativePath)
const goProjectPath = path.resolve(cwd, '../server')
async function build() {
await execaCommand('goreleaser release --snapshot --clean', {
stdio: 'inherit',
encoding: 'utf-8',
cwd: goProjectPath
})
await execaCommand('vite build', { stdio: 'inherit', encoding: 'utf-8', cwd })
if (existsSync(releasePath)) {
await remove(releasePath)