Files
Patrick Fallberg 9b630f7d46 Pipeline improvements (#964)
* Fix bug with toll-gate validation against master
* Change cppcheck to not attempt to validate headers directly and
  to run on the entire codebase in the pipeline.
* Support running Arduino test and examples build in parallel
2017-10-29 21:48:39 +01:00

24 lines
520 B
Bash
Executable File

#!/bin/bash
# Instantiate the tool runtime shim
. "$(git mystoolspath).bundle_runtime.sh"
# cppcheck takes one or more files as an argument.
# --cached or <no arg> for changed
if [[ $# = 0 ]]; then
for file in $(modifiedSourceFiles); do
if [[ $file != *.h ]]; then
runBundle $file
fi
done
elif [[ $1 = '--cached' ]]; then
for file in $(stagedSourceFiles); do
if [[ $file != *.h ]]; then
runBundle $file
fi
done
else
eval "set -- $(git rev-parse --sq --prefix "$GIT_PREFIX" "$@")"
runBundle "$@"
fi