[CI] Fetch origin before diffing

It turns out that origin/master may not be up to date in CircleCI
checkouts. Fetch origin so that diffing for the vendor check can be done
correctly.

Note that this doesn't help the case of PRs against branches other than
master, but the worst case is that those will waste a few seconds doing
unnecessary vendor validation. Since those PRs are relatively rare, that
seems fine.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
pull/2245/head
Aaron Lehmann 2017-04-12 13:16:15 -07:00
parent c3e06c6069
commit 2f728896a0
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,8 @@ test:
- gvm use stable && go version
# Ensure validation of dependencies
- git fetch origin:
pwd: $BASE_STABLE
- gvm use stable && if test -n "`git diff --stat=1000 origin/master | grep -E \"^[[:space:]]*vendor\"`"; then make dep-validate; fi:
pwd: $BASE_STABLE