summaryrefslogtreecommitdiff
path: root/tasks/bin/run_chef_tests
blob: ea5c5beeff3b28126db42ba62b1fb57248e8ea79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# Fail fast (e) and echo commands (vx)
set -evx

echo --color > .rspec
echo -fp >> .rspec

sudo sed -i -e 's/^Defaults\tsecure_path.*$//' /etc/sudoers;
# If we have any args, just run the given command
if [ -n "$1" ]; then
  sudo -E $(which bundle) exec $@;
else
  sudo -E $(which bundle) exec rake spec;
  bundle exec rake style;
  bundle exec bundle-audit check --update;
fi