Skip to content

Instantly share code, notes, and snippets.

@andrewgross
Last active December 16, 2015 16:40
Show Gist options
  • Save andrewgross/5464785 to your computer and use it in GitHub Desktop.
Save andrewgross/5464785 to your computer and use it in GitHub Desktop.
Makefile for Chef Repos
all: clean install
install:
bundle install
bundle exec berks install
test:
@bundle exec bash ${CHEF_PATH}/scripts/knife_test.sh
@bundle exec bash ${CHEF_PATH}/scripts/foodcritic_test.sh
@bundle exec bash ${CHEF_PATH}/scripts/rspec_test.sh
vagrant:
@if [ -a .vagrant ];\
then vagrant provision;\
else\
vagrant up;\
fi
ssh:
@vagrant ssh $(filter-out $@,$(MAKECMDGOALS))
status:
@vagrant status
clean:
@rm -f Berksfile.lock
@rm -f Gemfile.lock
@if [ -a .vagrant ];\
then vagrant destroy -f;\
rm -rf .vagrant;\
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment