How to update cookbook version in environment cookbook



I’m trying to use the environment cookbook model. I don’t understand what the correct method is to update the metadata.rb in the environment cookbook to match the version of the dependent cookbook that just passed tests. Do I have to write a script to take the version of the dependent cookbook from somewhere and update it in place in metadata.rb? That is kind of hacky.

Something like this would be nice…

berks update -v <new_version>

Running that would update metadata.rb and then subsequently the Berksfile.lock in the environment cookbook.


The knife-sport plugin can do something like you mentioned: