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

Add a reference task to generate REFERENCE.md #543

Merged
merged 2 commits into from
Apr 6, 2019

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Jan 11, 2019

In puppet-extlib we can now set:

Rakefile:
  puppet_strings_patterns: lib/puppet/functions/extlib/*.rb

@ekohl ekohl requested a review from ghoneycutt January 11, 2019 16:18
@ekohl
Copy link
Member Author

ekohl commented Jan 11, 2019

I left it out here, but I think we can now modify our Travis release job as follows:

before_deploy: "bundle exec rake reference"

That should fix part of #397 by ensuring we always have an up to date REFERENCE.md on the forge for released modules.

@ekohl
Copy link
Member Author

ekohl commented Jan 11, 2019

Btw, puppetlabs/puppet-strings#192 is similar, but doesn't allow overriding the pattern via the config.


desc 'Generate REFERENCE.md'
task :reference do
Rake::Task['strings:generate'].invoke('<%= @configs['puppet_strings_patterns'] %>', nil, nil, nil, 'false', 'true')
Copy link
Member

Choose a reason for hiding this comment

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

This should document what the fields are or link to the documentation as this is hard to grok.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right. I initially attempted to pass in arguments as a named hash but it looks like the rake invoke task doesn't support this so I took this short cut.

@ekohl
Copy link
Member Author

ekohl commented Apr 6, 2019

Updated. This now requires the freshly released puppet-strings 2.2.0 which includes my patch with a strings:generate:reference. That makes our invocation a lot easier and self documenting.

@ekohl
Copy link
Member Author

ekohl commented Apr 6, 2019

voxpupuli/puppet-extlib#131 is how puppet-extlib would make use of this.

config_defaults.yml Outdated Show resolved Hide resolved
@alexjfisher alexjfisher merged commit 6def77b into voxpupuli:master Apr 6, 2019
@logicminds
Copy link
Contributor

This should be

Rakefile:
  puppet_strings_patterns: lib/puppet/functions/**/*.rb functions/**/*.pp

@ekohl
Copy link
Member Author

ekohl commented Apr 6, 2019

Not sure I follow. Why is that?

@ekohl ekohl deleted the reference-task branch April 6, 2019 17:39
@logicminds
Copy link
Contributor

Ahh nevermind that is the custom config for the extlib.

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

Successfully merging this pull request may close these issues.

5 participants