Merge pull request #298 from cpuguy83/ci_validate_vendor

Update dep validation to only check the vendor dir
This commit is contained in:
Brian Goff
2018-08-03 21:27:09 -07:00
committed by GitHub

View File

@@ -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
}