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
|
||||||
ecosystem.config.cjs
|
ecosystem.config.cjs
|
||||||
ecosystem.config.js
|
ecosystem.config.js
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run workspace:shared && nuxt build",
|
"build": "npm run workspace:shared && nuxt build --dotenv .env.testmode",
|
||||||
"dev": "npm run workspace:shared && nuxt dev",
|
"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",
|
"generate": "nuxt generate",
|
||||||
"preview": "nuxt preview",
|
"preview": "nuxt preview",
|
||||||
"postinstall": "nuxt prepare",
|
"postinstall": "nuxt prepare",
|
||||||
|
|||||||
@@ -22,15 +22,24 @@ async function main() {
|
|||||||
if (fs.existsSync(TMP_PATH)) fs.rmSync(TMP_PATH, { force: true, recursive: true });
|
if (fs.existsSync(TMP_PATH)) fs.rmSync(TMP_PATH, { force: true, recursive: true });
|
||||||
fs.ensureDirSync(TMP_PATH);
|
fs.ensureDirSync(TMP_PATH);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!SKIP_BUILD) {
|
if (!SKIP_BUILD) {
|
||||||
console.log('Building');
|
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');
|
console.log('Creating zip file');
|
||||||
const archive = createZip(TMP_PATH + '/' + ZIP_NAME);
|
const archive = createZip(TMP_PATH + '/' + ZIP_NAME);
|
||||||
archive.directory(LOCAL_PATH + '/.output', '/.output');
|
archive.directory(LOCAL_PATH + '/.output', '/.output');
|
||||||
|
|
||||||
archive.file(LOCAL_PATH + '/ecosystem.config.js', { name: '/ecosystem.config.js' })
|
archive.file(LOCAL_PATH + '/ecosystem.config.js', { name: '/ecosystem.config.js' })
|
||||||
|
|
||||||
await archive.finalize();
|
await archive.finalize();
|
||||||
|
|||||||
Reference in New Issue
Block a user