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>
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
validate_dep() {
|
||||
dep ensure
|
||||
nChanges=$(git status --porcelain -u | wc -l)
|
||||
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 ]
|
||||
}
|
||||
|
||||
@@ -11,6 +13,7 @@ validate_dep || {
|
||||
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 diff Gopkg.toml Gopkg.lock
|
||||
git status --porcelain -u
|
||||
dep version
|
||||
exit $ret
|
||||
}
|
||||
Reference in New Issue
Block a user