From a1fb08a1f82342d2172e4ec399f4fc5052f82527 Mon Sep 17 00:00:00 2001 From: cte Date: Mon, 31 Mar 2025 02:38:08 -0700 Subject: [PATCH] More progress --- benchmark/apps/cli/src/index.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/benchmark/apps/cli/src/index.ts b/benchmark/apps/cli/src/index.ts index c4cf395902..a2fab1ab3f 100644 --- a/benchmark/apps/cli/src/index.ts +++ b/benchmark/apps/cli/src/index.ts @@ -57,9 +57,6 @@ const run = async (toolbox: GluegunToolbox) => { throw new Error(`Exercise is invalid: ${exercise}`) } - console.log(await execa({ cwd: exercisesPath })`git checkout -f`) - console.log(await execa({ cwd: exercisesPath })`git clean -fd`) - const id = config.runId ? Number(config.runId) : undefined let run: Run @@ -96,6 +93,15 @@ const run = async (toolbox: GluegunToolbox) => { throw new Error("No tasks found.") } + console.log(await execa({ cwd: exercisesPath })`git checkout -f`) + console.log(await execa({ cwd: exercisesPath })`git clean -fd`) + console.log(await execa({ cwd: exercisesPath })`git checkout -b runs/${run.id} main`) + + fs.writeFileSync( + path.resolve(exercisesPath, "settings.json"), + JSON.stringify({ ...rooCodeDefaults, ...run.settings }, null, 2), + ) + const server = new IpcServer(run.socketPath, () => {}) server.listen() @@ -146,6 +152,9 @@ const run = async (toolbox: GluegunToolbox) => { if (parentPid) { console.log(await execa`kill -INT ${parentPid}`) } + + console.log(await execa({ cwd: exercisesPath })`git add .`) + console.log(await execa({ cwd: exercisesPath })`git commit -m ${`Run #${run.id}`} --no-verify`) } const runExercise = async ({ run, task, server }: { run: Run; task: Task; server: IpcServer }) => {