Skip to content

Commit

Permalink
feat(cli): enable json output of cartesi deploy build
Browse files Browse the repository at this point in the history
  • Loading branch information
tuler committed Aug 6, 2024
1 parent f55ae37 commit 34b251c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-trees-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/cli": patch
---

enable json output of cartesi deploy build
6 changes: 4 additions & 2 deletions apps/cli/src/commands/deploy/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export default class DeployBuild extends BaseCommand<typeof DeployBuild> {
}),
};

public static enableJsonFlag = true;

private async buildRollupsImage(platform?: string) {
const buildResult = tmpNameSync();
const imagePath = this.getContextPath("image");
Expand Down Expand Up @@ -53,7 +55,7 @@ export default class DeployBuild extends BaseCommand<typeof DeployBuild> {
return fs.readFileSync(buildResult, "utf8");
}

public async run(): Promise<string> {
public async run() {
const { flags } = await this.parse(DeployBuild);

// print machine hash
Expand All @@ -75,6 +77,6 @@ export default class DeployBuild extends BaseCommand<typeof DeployBuild> {
value: image,
});

return image;
return { image };
}
}

0 comments on commit 34b251c

Please sign in to comment.