Files
virtual-kubelet/scripts/validate/dep.sh
Brian Goff f31b8245e7 Update dep validation to only check the vendor dir
This helps make sure that different versions of dep don't give different
results.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-08-03 21:22:38 -07:00

19 lines
549 B
Bash
Executable File

#!/bin/bash
validate_dep() {
dep ensure || return $?
# only check the vendor dir since different dep versions can cause changes to Gopkg files
nChanges=$(git status --porcelain -u ./vendor | wc -l)
[ $nChanges -eq 0 ]
}
validate_dep || {
ret=$?
echo '`dep ensure` was not run. Make sure dependency changes are committed to the repository.'
echo 'You may also need to check that all deps are pinned to a commit or tag instead of a branch or HEAD.'
echo 'Check Gopkg.toml and Gopkg.lock'
git status --porcelain -u
dep version
exit $ret
}