mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-09 23:48:36 +01:00
fix testmode push
This commit is contained in:
2
dashboard/.gitignore
vendored
2
dashboard/.gitignore
vendored
@@ -38,4 +38,4 @@ explains
|
||||
|
||||
#Ecosystem
|
||||
ecosystem.config.cjs
|
||||
ecosystem.config.js
|
||||
ecosystem.config.js
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "npm run workspace:shared && nuxt build",
|
||||
"dev": "npm run workspace:shared && nuxt dev",
|
||||
"build": "npm run workspace:shared && nuxt build --dotenv .env.testmode",
|
||||
"build:prod": "npm run workspace:shared && nuxt build --dotenv .env.prod",
|
||||
"dev": "npm run workspace:shared && nuxt dev --dotenv .env.testmode",
|
||||
"dev:prod": "npm run workspace:shared && nuxi dev --dotenv .env.prod",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare",
|
||||
|
||||
@@ -22,15 +22,24 @@ async function main() {
|
||||
if (fs.existsSync(TMP_PATH)) fs.rmSync(TMP_PATH, { force: true, recursive: true });
|
||||
fs.ensureDirSync(TMP_PATH);
|
||||
|
||||
|
||||
|
||||
if (!SKIP_BUILD) {
|
||||
console.log('Building');
|
||||
child.execSync(`cd ${LOCAL_PATH} && pnpm i && pnpm run build`)
|
||||
if (MODE === 'testmode') {
|
||||
child.execSync(`cd ${LOCAL_PATH} && pnpm run build`);
|
||||
} else if (MODE === 'production') {
|
||||
child.execSync(`cd ${LOCAL_PATH} && pnpm run build:prod`);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fs.rmSync(path.join(LOCAL_PATH, '.env'), { force: true });
|
||||
|
||||
console.log('Creating zip file');
|
||||
const archive = createZip(TMP_PATH + '/' + ZIP_NAME);
|
||||
archive.directory(LOCAL_PATH + '/.output', '/.output');
|
||||
|
||||
|
||||
archive.file(LOCAL_PATH + '/ecosystem.config.js', { name: '/ecosystem.config.js' })
|
||||
|
||||
await archive.finalize();
|
||||
|
||||
Reference in New Issue
Block a user