Skip to content

Commit

Permalink
Add option for JSON formatted output (#324)
Browse files Browse the repository at this point in the history
* Spit out JSON results at the end of a build

* Mark `--output_json` as conflicting with `--verbose`

* Override verbosity to `quiet` when outputting JSON

* Update tests to include `OutputType` param

* Temporarily please Clippy

* Add some logging

This is gonna fail, but I want to see what the CI has to say.

* Remove TODO so that format CI step passes

* Return result from `serialize_json`

* Make JSON test a sanity check

* Mention this PR in the CHANGELOG

* Implement `Default` for a few build options

* Address Clippy's `too_many_arguments` lint

* Use `ExecuteArgs` in tests

* Make `manifest_path` field public instead

Clippy was complaining about `dead_code` when building
in non-test mode, so I'm going with this instead.

* Apply suggestions from code review

Co-authored-by: Michael Müller <[email protected]>

* Sanity check `BuildResult'` JSON serialized form

* Add `execute()` test back

* Import `OutputType` in tests

Co-authored-by: Michael Müller <[email protected]>
  • Loading branch information
HCastano and Michael Müller authored Aug 12, 2021
1 parent 7bc6097 commit 259b716
Show file tree
Hide file tree
Showing 4 changed files with 245 additions and 112 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- Add option for JSON formatted output - [#324](https://github.com/paritytech/cargo-contract/pull/324)

### Changed
- Use new dependency resolver for template contract - [#325](https://github.com/paritytech/cargo-contract/pull/325)

Expand Down
Loading

0 comments on commit 259b716

Please sign in to comment.