Merge pull request #24 from weaveworks/find-files

Find files correctly
This commit is contained in:
Paul Bellamy
2016-07-14 17:03:38 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -10,4 +10,4 @@
mime_type=$1 mime_type=$1
shift 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
test
View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -ex set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
GO_TEST_ARGS=( -tags netgo -cpu 4 -timeout 8m ) GO_TEST_ARGS=( -tags netgo -cpu 4 -timeout 8m )
@@ -47,7 +47,7 @@ fi
fail=0 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 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 if [ -n "$CIRCLECI" ] && [ -z "$NO_SCHEDULER" ] && [ -x "$DIR/sched" ]; then