ci(lst): changes to improve the build process
This commit is contained in:
@@ -15,9 +15,9 @@
|
|||||||
"start:server": "dotenvx run -f .env -- node dist/server/index.js",
|
"start:server": "dotenvx run -f .env -- node dist/server/index.js",
|
||||||
"db:generate": "npx drizzle-kit generate",
|
"db:generate": "npx drizzle-kit generate",
|
||||||
"db:migrate": "npx drizzle-kit push",
|
"db:migrate": "npx drizzle-kit push",
|
||||||
"deploy": "standard-version --conventional-commits && npm run zipServer",
|
"deploy": "standard-version --conventional-commits && npm run prodBuild",
|
||||||
"zipServer": " tsx server/scripts/zipUpBuild.ts \"C:\\Users\\matthes01\\Documents\\lstv2\"",
|
"zipServer": " tsx server/scripts/zipUpBuild.ts \"C:\\Users\\matthes01\\Documents\\lstv2\"",
|
||||||
"prodBuild": "powershell -ExecutionPolicy Bypass -File server/scripts/build.ps1 -dir \"C:\\Users\\matthes01\\Documents\\lstv2",
|
"prodBuild": "powershell -ExecutionPolicy Bypass -File server/scripts/build.ps1 -dir \"C:\\Users\\matthes01\\Documents\\lstv2 && npm run zipServer",
|
||||||
"commit": "cz",
|
"commit": "cz",
|
||||||
"prodinstall": "npm i --omit=dev && npm run db:migrate"
|
"prodinstall": "npm i --omit=dev && npm run db:migrate"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -158,13 +158,18 @@ export const createZip = async (appLock: string) => {
|
|||||||
//createZip("C:\\Users\\matthes01\\Documents\\lstv2");
|
//createZip("C:\\Users\\matthes01\\Documents\\lstv2");
|
||||||
|
|
||||||
// Only call `createZip` if the script is executed directly
|
// Only call `createZip` if the script is executed directly
|
||||||
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
||||||
|
if (process.argv.length > 2) {
|
||||||
const location = process.argv[2];
|
const location = process.argv[2];
|
||||||
|
|
||||||
if (!location) {
|
if (!location) {
|
||||||
console.error("Error: No location provided.");
|
createLog("error", "lst", "zipUpBuild", "Error: No location provided.");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
} else {
|
||||||
|
createLog("info", "lst", "zipUpBuild", "Startiing the zip process.");
|
||||||
}
|
}
|
||||||
|
|
||||||
createZip(location);
|
createZip(location);
|
||||||
|
} else {
|
||||||
|
createLog("error", "lst", "zipUpBuild", "Error: No location provided.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user