From 2f728896a0fbd29284970aa8befc6e8f06ffa9ea Mon Sep 17 00:00:00 2001 From: Aaron Lehmann Date: Wed, 12 Apr 2017 13:16:15 -0700 Subject: [PATCH] [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 --- circle.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/circle.yml b/circle.yml index b49d64ae..99a639c6 100644 --- a/circle.yml +++ b/circle.yml @@ -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