From ef3e73d32d137705a09a88331223fb85cf8a7045 Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Thu, 16 Nov 2023 20:31:52 -0800 Subject: [PATCH] feat(deploy-script-support): Write out bundle file names in machine readable file --- packages/deploy-script-support/src/writeCoreProposal.js | 4 ++++ packages/internal/src/node/createBundles.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/deploy-script-support/src/writeCoreProposal.js b/packages/deploy-script-support/src/writeCoreProposal.js index 144ef6bebff..ee96c4020e9 100644 --- a/packages/deploy-script-support/src/writeCoreProposal.js +++ b/packages/deploy-script-support/src/writeCoreProposal.js @@ -113,10 +113,12 @@ export const makeWriteCoreProposal = ( // Await a reference then publish to the board. const cmds = []; + const files = []; const publishRef = async refP => { const { fileName, ...ref } = await refP; if (fileName) { cmds.push(`agd tx swingset install-bundle @${fileName}`); + files.push(fileName); } return harden(ref); @@ -162,6 +164,8 @@ const overrideManifest = ${stringify(overrideManifest, true)}; log(`creating ${proposalJsFile}`); await writeFile(proposalJsFile, trimmed); + await writeFile(`${filePrefix}-bundles.json`, `${JSON.stringify(files)}\n`); + log(`\ You can now run a governance submission command like: agd tx gov submit-proposal swingset-core-eval ${proposalPermitJsonFile} ${proposalJsFile} \\ diff --git a/packages/internal/src/node/createBundles.js b/packages/internal/src/node/createBundles.js index d17d1bb45ea..ecc7d505b73 100644 --- a/packages/internal/src/node/createBundles.js +++ b/packages/internal/src/node/createBundles.js @@ -23,7 +23,7 @@ export const createBundlesFromAbsolute = async sourceBundles => { } const bundle = match[1]; - const args = cacheToArgs.get(cache) || ['--to', cache]; + const args = cacheToArgs.get(cache) || ['--cache-js', cache]; args.push(srcPath, bundle); cacheToArgs.set(cache, args); }