jonlives / knife-spork

A workflow plugin to help many devs work with cookbooks and environments at once
Other
335 stars 97 forks source link

Bump comment tag #174

Open chazzly opened 9 years ago

chazzly commented 9 years ago

This PR supersedes PR #145.

I had originally separated this to its own branch, but after incorporating the new release, it seemed way easier to submit all as one.

This adds an option to the spork bump plug-in to prompt the user for a comment about their change (the reason for the bump). This comment is appended to CHANGELOG.md, which is then added to git. This comment can also be used as the commit message on a git commit. Based on suggestion from @TheSerapher, I've added the option to create a git tag of "[cookbook name]-[new version string]"

Future possibilities:

chazzly commented 9 years ago

@jonlives, one thing I don't like, but couldn't figure a better way to handle:

In order for the bump plugin to know to prompt for a comment, I added the config option: :bump_comment

The only way I could figure out to have the git plugin know that it should pull the comment was to also add the config option: :git --- :bump_comment

I really don't like having what is essentially a duplicate option, but i couldn't find another way to do it. Any suggestions?

jonlives commented 9 years ago

@chazzly thanks for this! I'll try and take a look through the code over the next few days and see what I can suggest re the config flag :)

chazzly commented 9 years ago

I re-based to master, and removed the bump-commit & bump-tag command line options, as they are not working (they work perfectly if specified in the config file, just not the command line, and bump_comment still works from the command line). I still haven't figured out a way around sharing the config options between "spork_bump.rb" and the git plug-in (Which is why the command line options above don't work). This does everything intended, but having to list "bump_comment" in two places in the config file is a little strange.

Any suggestions?