I have a cron job that runs berks vendor command every few mins. In my Berksfile I have a cookbook that I pull from my git repo. However looks like berkshelf would not download HEAD version of the dependency cookbook from git. How can I force it to download latest vesion?
0
votes
1 Answers
1
votes
When you do berks install Berkshelf installs all cookbook from Berksfile, and creates Berksfile.lock where it locks all version that you have specified inside Berksfile.
In your case when you do berks install it writes HEAD from desired repo in that point of the time, and when you try to vendor cookbooks it just vendor versions from Berksfile.lock, last known version to Berkshelf.
To solve your issue you must install the latest version of cookbook first and then verdor it. It can be done with:
berks update COOKBOOK_NAME
berks vendor
Note that update command will change your Berksfile.lock file.