7617ec176d
blame tibor this one ;-) ``` find . -type f -not -name '*.png' -not -name '*.go' -not -name '*.md' -not -name '*.tar' -not -name '*.pem' -not -path './vendor/*' -not -path './.git/*' -not -path '*/testdata/*' -not -path './docs/*images*' -not -path '*/testfiles/*' -not -path './bundles/*' -not -path './docs/*static*/*' -not -path './docs/*article-img/*' -exec grep -HnEl '[[:space:]]$' {} \; | xargs sed -iE 's/[[:space:]]*$//' ``` Signed-off-by: Vincent Batts <vbatts@redhat.com>
33 lines
964 B
Bash
33 lines
964 B
Bash
#!/bin/bash
|
|
|
|
if [ -z "$VALIDATE_UPSTREAM" ]; then
|
|
# this is kind of an expensive check, so let's not do this twice if we
|
|
# are running more than one validate bundlescript
|
|
|
|
VALIDATE_REPO='https://github.com/docker/docker.git'
|
|
VALIDATE_BRANCH='master'
|
|
|
|
if [ "$TRAVIS" = 'true' -a "$TRAVIS_PULL_REQUEST" != 'false' ]; then
|
|
VALIDATE_REPO="https://github.com/${TRAVIS_REPO_SLUG}.git"
|
|
VALIDATE_BRANCH="${TRAVIS_BRANCH}"
|
|
fi
|
|
|
|
VALIDATE_HEAD="$(git rev-parse --verify HEAD)"
|
|
|
|
git fetch -q "$VALIDATE_REPO" "refs/heads/$VALIDATE_BRANCH"
|
|
VALIDATE_UPSTREAM="$(git rev-parse --verify FETCH_HEAD)"
|
|
|
|
VALIDATE_COMMIT_LOG="$VALIDATE_UPSTREAM..$VALIDATE_HEAD"
|
|
VALIDATE_COMMIT_DIFF="$VALIDATE_UPSTREAM...$VALIDATE_HEAD"
|
|
|
|
validate_diff() {
|
|
if [ "$VALIDATE_UPSTREAM" != "$VALIDATE_HEAD" ]; then
|
|
git diff "$VALIDATE_COMMIT_DIFF" "$@"
|
|
fi
|
|
}
|
|
validate_log() {
|
|
if [ "$VALIDATE_UPSTREAM" != "$VALIDATE_HEAD" ]; then
|
|
git log "$VALIDATE_COMMIT_LOG" "$@"
|
|
fi
|
|
}
|
|
fi
|