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
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 3m54s
This commit is contained in:
@@ -2,6 +2,7 @@ import { spawn } from "node:child_process";
|
|||||||
import { createLogger } from "../logger/logger.controller.js";
|
import { createLogger } from "../logger/logger.controller.js";
|
||||||
import { emitToRoom } from "../socket.io/roomEmitter.socket.js";
|
import { emitToRoom } from "../socket.io/roomEmitter.socket.js";
|
||||||
import { updateAppStats } from "./updateAppStats.utils.js";
|
import { updateAppStats } from "./updateAppStats.utils.js";
|
||||||
|
import { getAppVersion } from "./version.utils.js";
|
||||||
import { zipBuild } from "./zipper.utils.js";
|
import { zipBuild } from "./zipper.utils.js";
|
||||||
|
|
||||||
export const emitBuildLog = (message: string, level = "info") => {
|
export const emitBuildLog = (message: string, level = "info") => {
|
||||||
@@ -28,6 +29,8 @@ export let building = false;
|
|||||||
const log = createLogger({ module: "utils", subModule: "builds" });
|
const log = createLogger({ module: "utils", subModule: "builds" });
|
||||||
export const build = async () => {
|
export const build = async () => {
|
||||||
const appDir = process.env.DEV_DIR ?? "";
|
const appDir = process.env.DEV_DIR ?? "";
|
||||||
|
const build = await getAppVersion();
|
||||||
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
building = true;
|
building = true;
|
||||||
|
|
||||||
@@ -72,6 +75,7 @@ export const build = async () => {
|
|||||||
updateAppStats({
|
updateAppStats({
|
||||||
lastUpdated: new Date(),
|
lastUpdated: new Date(),
|
||||||
building: false,
|
building: false,
|
||||||
|
currentBuild: build.build,
|
||||||
});
|
});
|
||||||
emitBuildLog(`Build failed with code ${code}`, "error");
|
emitBuildLog(`Build failed with code ${code}`, "error");
|
||||||
//reject(new Error(`Build failed with code ${code}`));
|
//reject(new Error(`Build failed with code ${code}`));
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { appStats } from "../db/schema/stats.schema.js";
|
|||||||
export const updateAppStats = async (
|
export const updateAppStats = async (
|
||||||
data: Partial<typeof appStats.$inferInsert>,
|
data: Partial<typeof appStats.$inferInsert>,
|
||||||
) => {
|
) => {
|
||||||
|
console.log(data);
|
||||||
await db
|
await db
|
||||||
.insert(appStats)
|
.insert(appStats)
|
||||||
.values({
|
.values({
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export const getAppVersion = async () => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
version: `${config.version}.${parseInt((config.build as string) ?? "1", 0) - 1}`,
|
version: `${config.version}.${parseInt((config.build as string) ?? "1", 0) - 1}`,
|
||||||
|
build: parseInt((config.build as string) ?? "1", 0),
|
||||||
lastBuildTime: config.lastBuildDate,
|
lastBuildTime: config.lastBuildDate,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ export const zipBuild = async () => {
|
|||||||
await updateAppStats({
|
await updateAppStats({
|
||||||
lastUpdated: new Date(),
|
lastUpdated: new Date(),
|
||||||
building: false,
|
building: false,
|
||||||
|
currentBuild: lstVersion.build,
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
17
frontend/src/routes/docs/datamart.tsx
Normal file
17
frontend/src/routes/docs/datamart.tsx
Normal 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>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -4,4 +4,10 @@
|
|||||||
{ "path": "./tsconfig.app.json" },
|
{ "path": "./tsconfig.app.json" },
|
||||||
{ "path": "./tsconfig.node.json" }
|
{ "path": "./tsconfig.node.json" }
|
||||||
],
|
],
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./src/*"]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "lst_v3",
|
"name": "lst_v3",
|
||||||
"version": "0.1.0-alpha.3",
|
"version": "0.1.0-alpha.3",
|
||||||
"build": "175",
|
"build": "179",
|
||||||
"lastBuildDate": "6/17/2026 10:26",
|
"lastBuildDate": "6/17/2026 11:03",
|
||||||
"description": "The tool that supports us in our everyday alplaprod",
|
"description": "The tool that supports us in our everyday alplaprod",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user