feat(release): automate versioned releases on main

This commit is contained in:
2026-09-17 18:41:53 +02:00
parent dd37622bb6
commit 92859f3ccf
39 changed files with 7365 additions and 243 deletions

View File

@@ -2,6 +2,7 @@ import type { FastifyInstance } from "fastify"
import { centralServicesClient } from "./push-server.client"
import { secrets } from "../utils/secrets"
import { getBuildInfo } from "../utils/buildInfo"
const DEFAULT_HEARTBEAT_INTERVAL_MS = 5 * 60 * 1000
@@ -31,7 +32,7 @@ export function startCentralServicesHeartbeat(server: FastifyInstance) {
const sendHeartbeat = async () => {
try {
const response = await centralServicesClient.heartbeat({
fedeoVersion: secrets.FEDEO_VERSION || "selfhost",
fedeoVersion: getBuildInfo().version,
baseUrl: instanceBaseUrl(),
})
console.log(`✅ Central Services Heartbeat: ${response.instanceId} (${response.status})`)

View File

@@ -1,6 +1,12 @@
import { FastifyInstance } from "fastify";
import { getBuildInfo } from "../utils/buildInfo";
export default async function routes(server: FastifyInstance) {
server.get("/version", async (_request, reply) => {
reply.header("Cache-Control", "no-store");
return getBuildInfo();
});
server.get("/ping", async () => {
// Testquery gegen DB
const result = await server.db.execute("SELECT NOW()");
@@ -10,4 +16,4 @@ export default async function routes(server: FastifyInstance) {
db: JSON.stringify(result.rows[0]),
};
});
}
}

View File

@@ -0,0 +1,7 @@
export function getBuildInfo() {
return {
product: "FEDEO",
version: process.env.FEDEO_VERSION || "0.0.0-dev",
revision: process.env.FEDEO_REVISION || "unknown",
};
}