refactor(builds): refactored the build process to hold in the build info plus version
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 3m54s

This commit is contained in:
2026-06-18 13:51:17 -05:00
parent 1b1918dcd0
commit 3e8417dcff
7 changed files with 32 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ import { spawn } from "node:child_process";
import { createLogger } from "../logger/logger.controller.js";
import { emitToRoom } from "../socket.io/roomEmitter.socket.js";
import { updateAppStats } from "./updateAppStats.utils.js";
import { getAppVersion } from "./version.utils.js";
import { zipBuild } from "./zipper.utils.js";
export const emitBuildLog = (message: string, level = "info") => {
@@ -28,6 +29,8 @@ export let building = false;
const log = createLogger({ module: "utils", subModule: "builds" });
export const build = async () => {
const appDir = process.env.DEV_DIR ?? "";
const build = await getAppVersion();
return new Promise((resolve) => {
building = true;
@@ -72,6 +75,7 @@ export const build = async () => {
updateAppStats({
lastUpdated: new Date(),
building: false,
currentBuild: build.build,
});
emitBuildLog(`Build failed with code ${code}`, "error");
//reject(new Error(`Build failed with code ${code}`));