Enforce OWNERS file in Godeps and vendor dirs

This commit is contained in:
Christoph Blecker 2018-02-15 13:30:30 -08:00
parent d3bcd367ec
commit a11ea4e45f
No known key found for this signature in database
GPG Key ID: B34A59A9D39F838B
2 changed files with 11 additions and 2 deletions

View File

@ -20,7 +20,6 @@ set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
source "${KUBE_ROOT}/hack/lib/util.sh"
kube::log::status "Ensuring prereqs"
kube::util::ensure_single_dir_gopath
@ -86,5 +85,15 @@ hack/update-bazel.sh >/dev/null
kube::log::status "Updating LICENSES file"
hack/update-godep-licenses.sh >/dev/null
kube::log::status "Creating OWNERS file"
rm -f "Godeps/OWNERS" "vendor/OWNERS"
cat <<__EOF__ > "Godeps/OWNERS"
reviewers:
- dep-reviewers
approvers:
- dep-approvers
__EOF__
cp "Godeps/OWNERS" "vendor/OWNERS"
# Clean up
rm -rf "${BACKUP}"

View File

@ -101,7 +101,7 @@ pushd "${KUBE_ROOT}" 2>&1 > /dev/null
ret=1
fi
if ! _out="$(diff -Naupr -x "BUILD" -x "OWNERS" -x "AUTHORS*" -x "CONTRIBUTORS*" vendor ${_kubetmp}/vendor)"; then
if ! _out="$(diff -Naupr -x "BUILD" -x "AUTHORS*" -x "CONTRIBUTORS*" vendor ${_kubetmp}/vendor)"; then
echo "Your vendored results are different:" >&2
echo "${_out}" >&2
echo "Godeps Verify failed." >&2