Skip to content

Commit

Permalink
feat(deploy-script-support): Write out bundle file names in machine r…
Browse files Browse the repository at this point in the history
…eadable file
  • Loading branch information
kriskowal committed Nov 22, 2023
1 parent 6d9ae67 commit aa510bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/deploy-script-support/src/writeCoreProposal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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} \\
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/src/node/createBundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit aa510bd

Please sign in to comment.