Skip to content

Commit

Permalink
Merge pull request #30 from pohly/vendor-check
Browse files Browse the repository at this point in the history
vendor check
  • Loading branch information
k8s-ci-robot authored Mar 27, 2019
2 parents 4c94fae + 46ba7d4 commit 8f1acbf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions release-tools/build.make
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ test-fmt:
false; \
fi

# This test only runs when dep >= 0.5 is installed, which is the case for the CI setup.
.PHONY: test-vendor
test: test-vendor
test-vendor:
@ echo; echo "### $@:"
@ case "$$(dep version 2>/dev/null | grep 'version *:')" in \
*v0.[56789]*) dep check && echo "vendor up-to-date" || false;; \
*) echo "skipping check, dep >= 0.5 required";; \
esac

.PHONY: test-subtree
test: test-subtree
test-subtree:
Expand Down
5 changes: 5 additions & 0 deletions release-tools/travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ services:
matrix:
include:
- go: 1.11.1
before_script:
- mkdir -p bin
- wget https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-amd64 -O bin/dep
- chmod u+x bin/dep
- export PATH=$PWD/bin:$PATH
script:
- make -k all test
after_success:
Expand Down
2 changes: 1 addition & 1 deletion release-tools/verify-subtree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ ! "$DIR" ]; then
exit 1
fi

REV=$(git log -n1 --format=format:%H --no-merges -- "$DIR")
REV=$(git log -n1 --remove-empty --format=format:%H --no-merges -- "$DIR")
if [ "$REV" ]; then
echo "Directory '$DIR' contains non-upstream changes:"
echo
Expand Down

0 comments on commit 8f1acbf

Please sign in to comment.