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}`));

View File

@@ -4,6 +4,7 @@ import { appStats } from "../db/schema/stats.schema.js";
export const updateAppStats = async (
data: Partial<typeof appStats.$inferInsert>,
) => {
console.log(data);
await db
.insert(appStats)
.values({

View File

@@ -11,6 +11,7 @@ export const getAppVersion = async () => {
return {
version: `${config.version}.${parseInt((config.build as string) ?? "1", 0) - 1}`,
build: parseInt((config.build as string) ?? "1", 0),
lastBuildTime: config.lastBuildDate,
};
};

View File

@@ -168,6 +168,7 @@ export const zipBuild = async () => {
await updateAppStats({
lastUpdated: new Date(),
building: false,
currentBuild: lstVersion.build,
});
return {

View File

@@ -0,0 +1,17 @@
import { createFileRoute } from "@tanstack/react-router";
export const Route = createFileRoute("/docs/datamart")({
component: RouteComponent,
});
function RouteComponent() {
return (
<div className="w-full h-[calc(100vh-48px)] overflow-hidden mr-2 ml-2">
<iframe
className="w-full h-full border-0"
title="datamart"
src="https://docs.tuffraid.net/share/40lshswjqq/p/logistics-support-tool-docs-g3nuKAZ7Pw"
/>
</div>
);
}

View File

@@ -4,4 +4,10 @@
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}

View File

@@ -1,8 +1,8 @@
{
"name": "lst_v3",
"version": "0.1.0-alpha.3",
"build": "175",
"lastBuildDate": "6/17/2026 10:26",
"build": "179",
"lastBuildDate": "6/17/2026 11:03",
"description": "The tool that supports us in our everyday alplaprod",
"main": "index.js",
"scripts": {