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

(PDK-1086) Change pdk build --force to warn if missing module metadata and continue #643

Merged
merged 1 commit into from
Apr 1, 2019

Conversation

rodjek
Copy link
Contributor

@rodjek rodjek commented Mar 25, 2019

If there is missing fields in the metadata.json when running pdk build --force, display an warning and continue as is expected when running with --force.

$ pdk new module foo --skip-interview
pdk (INFO): Creating new module: foo
[✔] Resolving default Gemfile dependencies.
pdk (INFO): Module 'foo' generated at path '/home/tsharpe/code/puppetlabs/pdk/foo', from template 'https://github.com/puppetlabs/pdk-templates'.
pdk (INFO): In your module directory, add classes with the 'pdk new class' command.
$ cd foo
$ pdk build --force
pdk (WARN): This module is missing the following fields in the metadata.json: summary, source, project_page, issues_url. These missing fields may affect the visibility of the module on the Forge.
pdk (INFO): Building tsharpe-foo version 0.1.0
pdk (INFO): Build of tsharpe-foo has completed successfully. Built package can be found here: /home/tsharpe/code/puppetlabs/pdk/foo/pkg/tsharpe-foo-0.1.0.tar.gz

Fixes #634

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.002%) to 93.069% when pulling 40fa149 on rodjek:pdk-1086 into 18721c4 on puppetlabs:master.

@rodjek rodjek requested a review from glennsarti March 25, 2019 23:20
exit 1
PDK.logger.warn _(
'This module is missing the following fields in the metadata.json: %{fields}. ' \
'These missing fields may affect the visibility of the module on the Forge.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Are any of the fields things that would cause the Forge to reject it? If so maybe this should say "may affect your ability to publish this module on the Forge" instead?

@rodjek rodjek merged commit 3e22a80 into puppetlabs:master Apr 1, 2019
@rodjek rodjek deleted the pdk-1086 branch April 1, 2019 01:20
@rodjek rodjek added the feature label Apr 1, 2019
@rodjek rodjek changed the title (PDK-1086) pdk build --force to warn if necessary and continue (PDK-1086) Change pdk build --force to warn if missing module metadata and continue Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants