From 5f5757c7848903abfce50e2992ed31f3ecfb99ac Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Fri, 14 Mar 2025 09:58:21 -0500 Subject: [PATCH] chore: bump build number to 8 --- package.json | 7 ++++--- server/scripts/zipUpBuild.ts | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 60ddcce..db7c8b0 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,9 @@ "start:server": "dotenvx run -f .env -- node dist/server/index.js", "db:generate": "npx drizzle-kit generate", "db:migrate": "npx drizzle-kit push", - "deploy": "standard-version --conventional-commits", - "zipServer": "powershell -ExecutionPolicy Bypass -File server/scripts/build.ps1 -dir \"C:\\Users\\matthes01\\Documents\\lstv2\" && node dist/server/scripts/zipUpBuild.js \"C:\\Users\\matthes01\\Documents\\lstv2", + "deploy": "standard-version --conventional-commits && npm run zipServer", + "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", "commit": "cz", "prodinstall": "npm i --omit=dev && npm run db:migrate" }, @@ -68,7 +69,7 @@ } }, "admConfig": { - "build": 7, + "build": 8, "dest": "C:\\Users\\matthes01\\Documents\\lstv2\\builds", "src": "C:\\Users\\matthes01\\Documents\\lstv2" } diff --git a/server/scripts/zipUpBuild.ts b/server/scripts/zipUpBuild.ts index 5515021..4db1280 100644 --- a/server/scripts/zipUpBuild.ts +++ b/server/scripts/zipUpBuild.ts @@ -6,6 +6,8 @@ import {createLog} from "../services/logger/logger.js"; // create the ignore list const ignoreList = [ + ".git", + "builds", "node_modules", "apiDocsLSTV2", "testFiles", @@ -14,6 +16,7 @@ const ignoreList = [ ".versionrc.json", "drizzle-dev.config.ts", "nssm.exe", + "postgresql-17.2-3-windows-x64.exe", // front end ignore "/frontend/node_modules", "fonrtend/.env", @@ -152,4 +155,16 @@ 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 (import.meta.url === `file://${process.argv[1]}`) { + const location = process.argv[2]; + + if (!location) { + console.error("Error: No location provided."); + process.exit(1); + } + + createZip(location); +}