typebot.io/commands/setup-worktree.ts
Baptiste Arnaud c2b251c7e5
♻️ Migrate to NX (#2418)
2026-03-18 15:29:32 +00:00

16 lines
540 B
TypeScript

import { $ } from "bun";
const currentWorktreeRoot = (
await $`git rev-parse --show-toplevel`.text()
).trim();
const gitCommonDir = (
await $`git rev-parse --path-format=absolute --git-common-dir`.text()
).trim();
const mainWorktreeRoot = (
await $`cd ${gitCommonDir} && cd .. && pwd`.text()
).trim();
await $`cp ${mainWorktreeRoot}/.env ${currentWorktreeRoot}/.env`;
await $`cp -R ${mainWorktreeRoot}/apps/viewer/src/test/.auth ${currentWorktreeRoot}/apps/viewer/src/test/.auth`;
await $`cd ${currentWorktreeRoot} && bun install`;