Skip to content

Commit

Permalink
fix: Add binary path to script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Teklad committed May 12, 2018
1 parent aceae46 commit 27b8577
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis/check-format.sh
@@ -1,14 +1,14 @@
#!/bin/bash
cd /build/
gcf_path="$(which git-clang-format-6.0)"
gcf_cmd="$(which git-clang-format-6.0) --binary $(which clang-format-6.0)"
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
base_commit="HEAD^"
echo "Running clang-format against parent commit $(git rev-parse $base_commit)"
else
base_commit="$TRAVIS_BRANCH"
echo "Running clang-format against branch $base_commit, with hash $(git rev-parse $base_commit)"
fi
output="$($gcf_path --commit $base_commit --diff --extensions 'cpp,h')"
output="$($gcf_cmd --commit $base_commit --diff --extensions 'cpp,h')"
if [ "$output" == "no modified files to format" ] || [ "$output" == "clang-format did not modify any files" ]; then
echo "clang-format passed."
exit 0
Expand Down

0 comments on commit 27b8577

Please sign in to comment.