hex/site/scripts/build.ts
Dax Raad 2d222022a5 feat(release): publish every platform to the Anomaly release service
The Release workflow uploads each target and the release to anoma.ly/release (dev.anoma.ly/release for staging) with curl and its GitHub OIDC token, records the AUR, Homebrew, and Nix distributions, mirrors the files to GitHub, and builds hex-bin from the published file. The ed25519 feeds, appcast generation, and Sparkle ZIP naming are gone; the 2.3.1 feeds stay frozen. Builds and installers use the release service names, the installers read the stable manifest and write the direct-install receipt, and the site reads its download links from the manifest.
2026-10-24 10:15:59 -04:00

14 lines
588 B
TypeScript

#!/usr/bin/env bun
// `bun run build [--mode dev]`: release data from the release service, typecheck, client build
// (Cloudflare Build Output), SSR build, then prerender.
import { parseArgs } from "node:util"
import { $ } from "bun"
const { values } = parseArgs({ options: { mode: { type: "string", default: "production" } } })
const mode = values.mode
await $`bun scripts/release-data.ts --mode ${mode}`
await $`tsc -b`
await $`vite build --mode ${mode}`
await $`vite build --mode ${mode} --ssr src/prerender.tsx --outDir dist-server`
await $`bun scripts/prerender.ts --mode ${mode}`