Merge "Allow compatibility with Berkshelf 2.x and 3.x"

This commit is contained in:
Jenkins 2014-08-07 22:31:31 +00:00 committed by Gerrit Code Review
commit 2995d11779

View File

@ -130,7 +130,12 @@
builders:
- shell: |
mkdir -p .cookbooks
ruby1.9.1 /usr/bin/bundle exec berks install --path=.cookbooks
grep -E .*berkshelf.*3\.\d*\.\d*.* Gemfile
if [ $? -eq 0 ]; then
ruby1.9.1 /usr/bin/bundle exec berks vendor .cookbooks
else
ruby1.9.1 /usr/bin/bundle exec berks install --path=.cookbooks
fi
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
if [ -z $COOKBOOK ]; then
echo "Cookbook name not defined in metadata.rb"