Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Return readable format by default from duffle bundle show #826

Merged
merged 1 commit into from
Aug 8, 2019

Conversation

radu-matei
Copy link
Member

@radu-matei radu-matei commented Aug 6, 2019

closes #821
closes #665
closes #702

This PR updates duffle bundle show to print indented JSON by default.

It can also be argued that a method for writing indented bundles can be added on the bundle structure - however, I think the format in which bundles are shown should be left for individual tools to decide.
That being said, I'm happy to discuss that.

cc @itowlson

To test:

$ duffle bundle show buildtest                                                                                                             
{
  "schemaVersion": "v1.0.0-WD",
  "name": "buildtest",
  "version": "0.1.0",
  "description": "A short description of your bundle",
  "keywords": [
   "buildtest",
   "cnab",
   "tutorial"
  ],
  "maintainers": [
   {
    "name": "John Doe",
    "email": "john.doe@example.com",
    "url": "https://example.com"
   },
   {
    "name": "Jane Doe",
    "email": "jane.doe@example.com",
    "url": "https://example.com"
   }
  ],
  "invocationImages": [
   {
    "imageType": "docker",
    "image": "deislabs/buildtest-cnab:07a9017ca57fb97e8d2ecf92bedb255a87855c51"
   }
  ]
 }
$ duffle bundle show buildtest --raw

{"description":"A short description of your bundle","invocationImages":[{"image":"deislabs/buildtest-cnab:07a9017ca57fb97e8d2ecf92bedb255a87855c51","imageType":"docker"}],"keywords":["buildtest","cnab","tutorial"],"maintainers":[{"email":"john.doe@example.com","name":"John Doe","url":"https://example.com"},{"email":"jane.doe@example.com","name":"Jane Doe","url":"https://example.com"}],"name":"buildtest","schemaVersion":"v1.0.0-WD","version":"0.1.0"}

Signed-off-by: Radu M <root@radu.sh>
Copy link
Member

@technosophos technosophos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@itowlson itowlson merged commit b464875 into cnabio:master Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants