Skip to content

Commit

Permalink
Merge pull request #24 from weaveworks/find-files
Browse files Browse the repository at this point in the history
Find files correctly
  • Loading branch information
paulbellamy authored Jul 14, 2016
2 parents b2ab380 + 8786427 commit 5b9b314
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion files-with-type
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
mime_type=$1
shift

find "$@" -print0 -type f |xargs -0 file --mime-type | grep "${mime_type}" | sed -e 's/:.*$//'
git ls-files | grep -vE '^vendor/' | xargs file --mime-type | grep "${mime_type}" | sed -e 's/:.*$//'
4 changes: 2 additions & 2 deletions test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -ex
set -e

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
GO_TEST_ARGS=( -tags netgo -cpu 4 -timeout 8m )
Expand Down Expand Up @@ -47,7 +47,7 @@ fi

fail=0

TESTDIRS=( $(find . -type f -name '*_test.go' -print0 | xargs -0 -n1 dirname | grep -vE '^\./(\.git|vendor|prog|experimental)/' | sort -u) )
TESTDIRS=( $(git ls-files -- '*_test.go' | grep -vE '^(vendor|prog|experimental)/' | xargs -n1 dirname | sort -u) )

# If running on circle, use the scheduler to work out what tests to run on what shard
if [ -n "$CIRCLECI" ] && [ -z "$NO_SCHEDULER" ] && [ -x "$DIR/sched" ]; then
Expand Down

0 comments on commit 5b9b314

Please sign in to comment.