Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3524 from trufflesuite/artifact-db-resources-from…
Browse files Browse the repository at this point in the history
…-compile

Ensure artifacts are saved with db info
  • Loading branch information
gnidan authored and g. nicholas d'andrea committed Feb 5, 2021
2 parents bc91ea9 + d2da733 commit 3db1a8a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/workflow-compile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ const WorkflowCompile = {

await fse.ensureDir(config.contracts_build_directory);

const artifacts = contracts.map(Shims.NewToLegacy.forContract);
await config.artifactor.saveAll(artifacts);

if (options.db && options.db.enabled === true && contracts.length > 0) {
const db = connect(config);
const project = await Project.initialize({
Expand All @@ -117,10 +114,13 @@ const WorkflowCompile = {
directory: config.working_directory
}
});
await project.loadCompile({
({contracts} = await project.loadCompile({
result: {contracts, compilations}
});
}));
}

const artifacts = contracts.map(Shims.NewToLegacy.forContract);
await config.artifactor.saveAll(artifacts);
}
};

Expand Down

0 comments on commit 3db1a8a

Please sign in to comment.