Skip to content

Include Changelog entries in r10k:dependencies output #47

@alanwevans

Description

@alanwevans

Background

While looking to see if my dependencies are out of date today, I decided it would be a good idea to check the CHANGELOGS before I blindly update things. It occurred to me that this is probably available in the puppetforge API already (it is). So all we need to do is parse/print it.

Proposal

The r10k:dependencies should optionally attempt output a configurable number of changelog entries between the currently installed version and the newest available version.

Note: I am working on a patch already but I thought I'd solicit some feedback first.

Feedback Needed

Passing arguments or parameters to rake can be done in a few ways. There is precedent in ra10ke for using the "rake" way, but personally I dislike that way.

The options:

  1. The "rake" way - rake r10k::dependencies[10] (these arguments are positional which means remembering what goes where and using square brackets on the commandline can be troublesome)
  2. Environment variables - rake r10k::dependencies CHANGELOG=10
    (in order to prevent environment variable name collisions I prefer prefixing variables with the project name or some sensible key, in this case 'RA10KE_' but that makes for unwieldy environment variable names)
  3. ARGV - rake r10k::dependencies 10 (still positional but at least the brackets are gone)
  4. Ruby OptionParser - rake r10k:dependencies --changelog=10 (this is nice, but not very "rake like")

See 4 Ways to Pass Arguments to a Rake Task for a full discussion.

I personally prefer the environment variable option because it "feels like rake", it is used by make and it is more clear to me than the "rake way".

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions