From 11f1d6e4b299485bc6e568e640e42a581f006804 Mon Sep 17 00:00:00 2001 From: "akeem.deviant" Date: Thu, 3 Sep 2026 13:41:43 +0200 Subject: [PATCH] fix --- .../git/GitProductionGameDataProposalGateway.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/studio/src/infrastructure/git/GitProductionGameDataProposalGateway.ts b/studio/src/infrastructure/git/GitProductionGameDataProposalGateway.ts index af90c16..14bab9c 100644 --- a/studio/src/infrastructure/git/GitProductionGameDataProposalGateway.ts +++ b/studio/src/infrastructure/git/GitProductionGameDataProposalGateway.ts @@ -1,5 +1,5 @@ import { execFile } from 'node:child_process'; -import { mkdtemp, mkdir, rm, writeFile } from 'node:fs/promises'; +import { cp, mkdtemp, mkdir, rm, writeFile } from 'node:fs/promises'; import { tmpdir } from 'node:os'; import { dirname, join } from 'node:path'; import { promisify } from 'node:util'; @@ -34,6 +34,13 @@ export class GitProductionGameDataProposalGateway implements ProductionGameDataP const catalogPath = join(worktreePath, 'data', 'commanders.json'); await mkdir(dirname(catalogPath), { recursive: true }); await writeFile(catalogPath, `${JSON.stringify(commanders, null, 2)}\n`, 'utf8'); + + const internalCatalogPath = 'studio/store/catalog'; + await cp( + join(this.repositoryPath, internalCatalogPath), + join(worktreePath, internalCatalogPath), + { recursive: true }, + ); await this.npm(['version', 'patch', '--no-git-tag-version'], worktreePath); await this.git([ '-C', @@ -41,6 +48,7 @@ export class GitProductionGameDataProposalGateway implements ProductionGameDataP 'add', '--', 'data/commanders.json', + internalCatalogPath, 'package.json', 'package-lock.json', ]); @@ -56,6 +64,7 @@ export class GitProductionGameDataProposalGateway implements ProductionGameDataP 'feat(data): propose production commanders', ]); await this.git(['-C', worktreePath, 'push', '--set-upstream', 'origin', branchName]); + await this.git(['restore', '--source=HEAD', '--worktree', '--', internalCatalogPath]); return { branchName }; } finally { if (worktreeCreated) {