Allow compatibility with Berkshelf 2.X and 3.X
moved mkdir -p .cookbooks to be only run if not berks 3 because berks vendor fails when it tries to create .cookbooks and it already exists Change-Id: I915859c1925fe06771f53c94094b70b086f647b0 Implements: blueprint update-berkshelf
This commit is contained in:
parent
762c3a0c1e
commit
5d25ff47a4
@ -129,11 +129,12 @@
|
||||
name: chef-berkshelf-prep
|
||||
builders:
|
||||
- shell: |
|
||||
mkdir -p .cookbooks
|
||||
#!/bin/bash -x
|
||||
grep -E .*berkshelf.*3\.\d*\.\d*.* Gemfile
|
||||
if [ $? -eq 0 ]; then
|
||||
ruby1.9.1 /usr/bin/bundle exec berks vendor .cookbooks
|
||||
else
|
||||
mkdir -p .cookbooks
|
||||
ruby1.9.1 /usr/bin/bundle exec berks install --path=.cookbooks
|
||||
fi
|
||||
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
||||
|
Loading…
x
Reference in New Issue
Block a user