From 48ca428deceaf78d3b3467ac8745f2832846ed9b Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Fri, 13 Sep 2024 17:29:55 +0100 Subject: [PATCH] build after pull --- packages/cli/src/commands/pull.ts | 4 +++- packages/cli/src/pull/pull.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/commands/pull.ts b/packages/cli/src/commands/pull.ts index c45395c03d..c6b6da8703 100644 --- a/packages/cli/src/commands/pull.ts +++ b/packages/cli/src/commands/pull.ts @@ -4,6 +4,7 @@ import { Address, createClient, http } from "viem"; import chalk from "chalk"; import { WriteFileExistsError, pull } from "../pull/pull"; import path from "node:path"; +import { build } from "../build"; const options = { worldAddress: { type: "string", required: true, desc: "Remote world address" }, @@ -48,12 +49,13 @@ const commandModule: CommandModule = { const rootDir = process.cwd(); try { - await pull({ + const { config } = await pull({ rootDir, client, worldAddress: opts.worldAddress as Address, replace: opts.replace, }); + await build({ rootDir, config, foundryProfile: profile }); } catch (error) { if (error instanceof WriteFileExistsError) { console.log(); diff --git a/packages/cli/src/pull/pull.ts b/packages/cli/src/pull/pull.ts index af6a744128..30bda1bd40 100644 --- a/packages/cli/src/pull/pull.ts +++ b/packages/cli/src/pull/pull.ts @@ -197,6 +197,8 @@ export async function pull({ rootDir, client, worldAddress, replace }: PullOptio const source = abiToInterface({ name: interfaceName, abi: worldAbi }); await writeFile(path.join(rootDir, interfaceFile), await formatSolidity(source), { overwrite: replaceFiles }); } + + return { config }; } export async function exists(filename: string) {