Compare commits

...

6 Commits

2 changed files with 95 additions and 73 deletions

View File

@@ -15,7 +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", "deploy": "standard-version --conventional-commits && npm run prodBuild",
"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 && 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"
}, },
@@ -67,7 +69,7 @@
} }
}, },
"admConfig": { "admConfig": {
"build": 2, "build": 8,
"dest": "C:\\Users\\matthes01\\Documents\\lstv2\\builds", "dest": "C:\\Users\\matthes01\\Documents\\lstv2\\builds",
"src": "C:\\Users\\matthes01\\Documents\\lstv2" "src": "C:\\Users\\matthes01\\Documents\\lstv2"
} }

View File

@@ -6,6 +6,8 @@ import {createLog} from "../services/logger/logger.js";
// create the ignore list // create the ignore list
const ignoreList = [ const ignoreList = [
".git",
"builds",
"node_modules", "node_modules",
"apiDocsLSTV2", "apiDocsLSTV2",
"testFiles", "testFiles",
@@ -14,6 +16,7 @@ const ignoreList = [
".versionrc.json", ".versionrc.json",
"drizzle-dev.config.ts", "drizzle-dev.config.ts",
"nssm.exe", "nssm.exe",
"postgresql-17.2-3-windows-x64.exe",
// front end ignore // front end ignore
"/frontend/node_modules", "/frontend/node_modules",
"fonrtend/.env", "fonrtend/.env",
@@ -152,4 +155,21 @@ 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
if (process.argv.length > 2) {
const location = process.argv[2];
if (!location) {
createLog("error", "lst", "zipUpBuild", "Error: No location provided.");
process.exit(1);
} else {
createLog("info", "lst", "zipUpBuild", "Startiing the zip process.");
}
createZip(location);
} else {
createLog("error", "lst", "zipUpBuild", "Error: No location provided.");
}