github.com/duglin/docker@v1.13.1/hack/validate/.validate (about) 1 #!/bin/bash 2 3 set -e -o pipefail 4 5 if [ -z "$VALIDATE_UPSTREAM" ]; then 6 # this is kind of an expensive check, so let's not do this twice if we 7 # are running more than one validate bundlescript 8 9 VALIDATE_REPO='https://github.com/docker/docker.git' 10 VALIDATE_BRANCH='master' 11 12 VALIDATE_HEAD="$(git rev-parse --verify HEAD)" 13 14 git fetch -q "$VALIDATE_REPO" "refs/heads/$VALIDATE_BRANCH" 15 VALIDATE_UPSTREAM="$(git rev-parse --verify FETCH_HEAD)" 16 17 VALIDATE_COMMIT_LOG="$VALIDATE_UPSTREAM..$VALIDATE_HEAD" 18 VALIDATE_COMMIT_DIFF="$VALIDATE_UPSTREAM...$VALIDATE_HEAD" 19 20 validate_diff() { 21 if [ "$VALIDATE_UPSTREAM" != "$VALIDATE_HEAD" ]; then 22 git diff "$VALIDATE_COMMIT_DIFF" "$@" 23 fi 24 } 25 validate_log() { 26 if [ "$VALIDATE_UPSTREAM" != "$VALIDATE_HEAD" ]; then 27 git log "$VALIDATE_COMMIT_LOG" "$@" 28 fi 29 } 30 fi