Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata.json structure is rewritten after increase version #96

Open
rmestrum opened this issue Jan 25, 2021 · 1 comment
Open

metadata.json structure is rewritten after increase version #96

rmestrum opened this issue Jan 25, 2021 · 1 comment

Comments

@rmestrum
Copy link

When I increase the version of the module with with the rake task for example module:bump:minor, a new metadata.json is created.
When this file created, the format is changed into a pretty format.

It would be nice if there is a possibility to maintain the current formatting.

For example.

{
  "name": "org-my_module",
  "version": "1.1.2",
  "author": "Me",
  "license": "Apache-2.0",
  "summary": "summary",
  "source": "https://github.com",
  "project_page": "https://github.com",
  "issues_url": "https://github.com",
  "tags": ["tag1","tag2"],
  "operatingsystem_support": [
    { "operatingsystem": "RedHat", "operatingsystemrelease": [ "6", "7" ] },
    { "operatingsystem": "CentOS", "operatingsystemrelease": [ "6", "7" ] }
  ],
  "dependencies": [
    { "name": "puppetlabs/stdlib", "version_requirement": ">=4.25.0 <7.0.0" }
  ]
}

is not rewritten to

{
  "name": "org-my_module",
  "version": "1.1.2",
  "author": "Me",
  "license": "Apache-2.0",
  "summary": "summary",
  "source": "https://github.com",
  "project_page": "https://github.com",
  "issues_url": "https://github.com",
  "tags": [
    "tag1",
    "tag2"
  ],
  "operatingsystem_support": [
    { 
      "operatingsystem": "RedHat", 
      "operatingsystemrelease": [ 
        "6", 
        "7" 
      ]
    },
    { 
      "operatingsystem": "CentOS", 
      "operatingsystemrelease": [ 
        "6", 
        "7" 
      ]
    }
  ],
  "dependencies": [
    { 
      "name": "puppetlabs/stdlib",  
      "version_requirement": ">=4.25.0 <7.0.0" 
    }
  ]
}
@ekohl
Copy link
Member

ekohl commented Jan 25, 2021

I don't think it's possible without a significant effort. We use the built in JSON library. There is https://github.com/Phrogz/NeatJSON but I don't want to depend on an external gem if we don't have to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants