openclaw/scripts/build-plugin-env.mjs
kumarabhirup 135fa3608a
chore: bump version to 2.0.12 and add plugin build infra
Add build:plugin-env script to bake the PostHog key into the plugin at pack time.
2026-03-05 19:08:51 -08:00

8 lines
212 B
JavaScript

import { writeFileSync } from "node:fs";
const key = process.env.POSTHOG_KEY || "";
writeFileSync(
"extensions/posthog-analytics/lib/build-env.js",
`export const POSTHOG_KEY = ${JSON.stringify(key)};\n`,
);