File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed
Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22set -ev
3- MODS=" $( git diff HEAD~1 Puppetfile | grep ^- -B2 | grep mod | cut -d" '" -f2) "
3+ MODS=" $( git diff HEAD~1 Puppetfile | grep ^+ -B2 | grep mod | cut -d" '" -f2) "
44rake validate_puppetfile SPEC_OPTS=' --format documentation --color --backtrace' || exit 1
5- for module in ${MODS} ; do
6- if [ -e ./${module} /Rakefile ]; then
7- rake test_modules[./${module} /Rakefile] SPEC_OPTS=' --format documentation --color --backtrace' || exit 1
8- else
9- echo " Missing ./${module} /Rakefile, not running spec tests."
10- fi
11- done
5+ if [ " ${MODS} " != " " ]; then
6+ for module in ${MODS} ; do
7+ if [ -e ./${module} /Rakefile ]; then
8+ rake test_modules[./${module} /Rakefile] SPEC_OPTS=' --format documentation --color --backtrace' || exit 1
9+ else
10+ echo " Missing ./${module} /Rakefile, not running spec tests. You have to manually check whether this is OK."
11+ exit 1
12+ fi
13+ done
14+ else
15+ echo " No changed module detected. You have to manually check whether this is OK."
16+ git diff HEAD~1 Puppetfile
17+ exit 1
18+ fi
You can’t perform that action at this time.
0 commit comments