mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 52s
Build Docker Images / check (push) Failing after 5m20s
Build Docker Images / tests (push) Failing after 6s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / build (push) Failing after 13s
Mirror to Codeberg / Mirror (push) Failing after 0s
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Build Docker Images / lint (push) Successful in 26s
Nix Build / check (push) Failing after 32m35s
34 lines
818 B
TypeScript
34 lines
818 B
TypeScript
import { build } from "bun";
|
|
import { $ } from "bun";
|
|
import ora from "ora";
|
|
|
|
const buildSpinner = ora("Building").start();
|
|
|
|
await $`rm -rf dist && mkdir dist`;
|
|
|
|
await build({
|
|
entrypoints: [
|
|
"entrypoints/worker/index.ts",
|
|
// HACK: Include to avoid cyclical import errors
|
|
"config.ts",
|
|
],
|
|
outdir: "dist",
|
|
target: "bun",
|
|
splitting: true,
|
|
minify: false,
|
|
});
|
|
|
|
buildSpinner.text = "Transforming";
|
|
|
|
// Copy Drizzle migrations to dist
|
|
await $`cp -r drizzle dist/drizzle`;
|
|
|
|
// Copy Sharp to dist
|
|
await $`mkdir -p dist/node_modules/@img`;
|
|
await $`cp -r node_modules/@img/sharp-libvips-linuxmusl-* dist/node_modules/@img`;
|
|
await $`cp -r node_modules/@img/sharp-linuxmusl-* dist/node_modules/@img`;
|
|
|
|
await $`cp -r node_modules/detect-libc dist/node_modules/`;
|
|
|
|
buildSpinner.stop();
|