Last active
August 29, 2015 13:57
-
-
Save fijimunkii/9809127 to your computer and use it in GitHub Desktop.
vagrant: adds latest rbenv to berksfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repo="fnichol/chef-rbenv" | |
latest_release=$(curl -s https://api.github.com/repos/$repo/git/refs/tags \ | |
| ruby -rjson -e ' | |
j = JSON.parse(STDIN.read); | |
puts j.map { |t| t["ref"].split("/").last }.sort.last | |
') | |
cat >> Berksfile <<END_OF_BERKSFILE | |
cookbook 'rbenv', | |
:git => 'git://github.com/$repo.git', :branch => '$latest_release' | |
END_OF_BERKSFILE | |
berks install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment