vendor updates

This commit is contained in:
Serguei Bezverkhi
2018-03-06 17:33:18 -05:00
parent 4b3ebc171b
commit e9033989a0
5854 changed files with 248382 additions and 119809 deletions

View File

@ -18,30 +18,6 @@ set -o errexit
set -o nounset
set -o pipefail
# As of go 1.6, the vendor experiment is enabled by default.
export GO15VENDOREXPERIMENT=1
#### HACK ####
# Sometimes godep just can't handle things. This lets use manually put
# some deps in place first, so godep won't fall over.
preload-dep() {
org="$1"
project="$2"
sha="$3"
# project_dir ($4) is optional, if unset we will generate it
if [[ -z ${4:-} ]]; then
project_dir="${GOPATH}/src/${org}/${project}.git"
else
project_dir="${4}"
fi
echo "**HACK** preloading dep for ${org} ${project} at ${sha} into ${project_dir}"
git clone "https://${org}/${project}" "${project_dir}" > /dev/null 2>&1
pushd "${project_dir}" > /dev/null
git checkout "${sha}"
popd > /dev/null
}
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
@ -49,10 +25,14 @@ readonly branch=${1:-${KUBE_VERIFY_GIT_BRANCH:-master}}
if ! [[ ${KUBE_FORCE_VERIFY_CHECKS:-} =~ ^[yY]$ ]] && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'Godeps/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'vendor/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'hack/lib/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'hack/.*godep'; then
exit 0
fi
# Ensure we have the right godep version available
kube::util::ensure_godep_version
if [[ -z ${TMP_GOPATH:-} ]]; then
# Create a nice clean place to put our new godeps
_tmpdir="$(mktemp -d -t gopath.XXXXXX)"
@ -105,14 +85,14 @@ ret=0
pushd "${KUBE_ROOT}" 2>&1 > /dev/null
# Test for diffs
if ! _out="$(diff -Naupr --ignore-matching-lines='^\s*\"GoVersion\":' --ignore-matching-line='^\s*\"GodepVersion\":' --ignore-matching-lines='^\s*\"Comment\":' Godeps/Godeps.json ${_kubetmp}/Godeps/Godeps.json)"; then
echo "Your Godeps.json is different:"
echo "${_out}"
echo "Godeps Verify failed."
echo "Your Godeps.json is different:" >&2
echo "${_out}" >&2
echo "Godeps Verify failed." >&2
echo "${_out}" > godepdiff.patch
echo "If you're seeing this locally, run the below command to fix your Godeps.json:"
echo "patch -p0 < godepdiff.patch"
echo "(The above output can be saved as godepdiff.patch if you're not running this locally)"
echo "(The patch file should also be exported as a build artifact if run through CI)"
echo "If you're seeing this locally, run the below command to fix your Godeps.json:" >&2
echo "patch -p0 < godepdiff.patch" >&2
echo "(The above output can be saved as godepdiff.patch if you're not running this locally)" >&2
echo "(The patch file should also be exported as a build artifact if run through CI)" >&2
KEEP_TMP=true
if [[ -f godepdiff.patch && -d "${ARTIFACTS_DIR:-}" ]]; then
echo "Copying patch to artifacts.."
@ -122,14 +102,14 @@ pushd "${KUBE_ROOT}" 2>&1 > /dev/null
fi
if ! _out="$(diff -Naupr -x "BUILD" -x "AUTHORS*" -x "CONTRIBUTORS*" vendor ${_kubetmp}/vendor)"; then
echo "Your vendored results are different:"
echo "${_out}"
echo "Godeps Verify failed."
echo "Your vendored results are different:" >&2
echo "${_out}" >&2
echo "Godeps Verify failed." >&2
echo "${_out}" > vendordiff.patch
echo "If you're seeing this locally, run the below command to fix your directories:"
echo "patch -p0 < vendordiff.patch"
echo "(The above output can be saved as godepdiff.patch if you're not running this locally)"
echo "(The patch file should also be exported as a build artifact if run through CI)"
echo "If you're seeing this locally, run the below command to fix your directories:" >&2
echo "patch -p0 < vendordiff.patch" >&2
echo "(The above output can be saved as godepdiff.patch if you're not running this locally)" >&2
echo "(The patch file should also be exported as a build artifact if run through CI)" >&2
KEEP_TMP=true
if [[ -f vendordiff.patch && -d "${ARTIFACTS_DIR:-}" ]]; then
echo "Copying patch to artifacts.."