change registry
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { execSync } from 'node:child_process'
|
||||
import { existsSync } from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
|
||||
process.chdir(root)
|
||||
|
||||
execSync('node scripts/write-docker-vite-env.mjs', { stdio: 'inherit' })
|
||||
execSync('npm run build-only', { stdio: 'inherit' })
|
||||
|
||||
if (!existsSync(path.join(root, 'dist', 'index.html'))) {
|
||||
throw new Error('dist/index.html ساخته نشد')
|
||||
}
|
||||
|
||||
const out = 'deploy-dist.tar.gz'
|
||||
execSync(`tar -czf ${out} dist scripts/serve-user.mjs`, { stdio: 'inherit' })
|
||||
console.log(`packed ${out}`)
|
||||
Reference in New Issue
Block a user