fix: build is excluded from git

Signed-off-by: sisungo <[email protected]>
This commit is contained in:
2026-09-14 12:16:11 +00:00
parent 1b3d2b768a
commit 974fd52ae5
3 changed files with 31 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
node_modules/
# Build output
build/
/build
.svelte-kit/
# Rust build artifacts
+1
View File
@@ -18,6 +18,7 @@ export const POST: RequestHandler = async ({ request, cookies }) => {
httpOnly: true,
sameSite: 'lax',
maxAge: 7 * 24 * 60 * 60,
secure: false,
});
return json({ ok: true });
@@ -0,0 +1,29 @@
import { json } from '@sveltejs/kit';
import { createBuild } from '$lib/server/db.js';
import type { RequestHandler } from './$types';
export const POST: RequestHandler = async ({ params, request, locals }) => {
if (!locals.user) {
return json({ error: 'Login required' }, { status: 401 });
}
const body = await request.json();
const arch = body.arch ?? '';
const target = body.target ?? `${arch || 'x86_64'}-semios-linux`;
const atombuild = body.atombuild ?? true;
const trigger = body.trigger ?? 'manual';
try {
const buildId = createBuild(params.name, target, atombuild, trigger);
return json({
status: 'queued',
build_id: buildId,
message: `Build of ${params.name} queued`
});
} catch (e) {
return json({
status: 'error',
message: (e as Error).message
}, { status: 500 });
}
};