diff --git a/go.mod b/go.mod index ff32b8eff..2caea00d1 100644 --- a/go.mod +++ b/go.mod @@ -55,7 +55,7 @@ require ( k8s.io/code-generator v0.18.8 k8s.io/gengo v0.0.0-20200205140755-e0e292d8aa12 k8s.io/klog v1.0.0 - knative.dev/test-infra v0.0.0-20201015231956-d236fb0ea9ff + knative.dev/test-infra v0.0.0-20201020210659-8f5dc4814ac3 sigs.k8s.io/boskos v0.0.0-20200729174948-794df80db9c9 ) diff --git a/go.sum b/go.sum index d932a11cf..30058c954 100644 --- a/go.sum +++ b/go.sum @@ -1909,8 +1909,8 @@ knative.dev/test-infra v0.0.0-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxP knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE= knative.dev/test-infra v0.0.0-20200519015156-82551620b0a9/go.mod h1:A5b2OAXTOeHT3hHhVQm3dmtbuWvIDP7qzgtqxA3/2pE= knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7/go.mod h1:RjYAhXnZqeHw9+B0zsbqSPlae0lCvjekO/nw5ZMpLCs= -knative.dev/test-infra v0.0.0-20201015231956-d236fb0ea9ff h1:I8tkQx28wNs6v/ymlGv6oKQFASCFHTgJtgo7dvv5XII= -knative.dev/test-infra v0.0.0-20201015231956-d236fb0ea9ff/go.mod h1:lm0U0k6ARXr8Po0LcSTCfETg63LOF3ajUxcoqy5JSH0= +knative.dev/test-infra v0.0.0-20201020210659-8f5dc4814ac3 h1:FldGYq5wPrQqGuC8JI3a07nC0lGKqG7wtqvebxonnnE= +knative.dev/test-infra v0.0.0-20201020210659-8f5dc4814ac3/go.mod h1:lm0U0k6ARXr8Po0LcSTCfETg63LOF3ajUxcoqy5JSH0= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= diff --git a/vendor/knative.dev/test-infra/scripts/library.sh b/vendor/knative.dev/test-infra/scripts/library.sh index 7e191d971..3d28f1899 100644 --- a/vendor/knative.dev/test-infra/scripts/library.sh +++ b/vendor/knative.dev/test-infra/scripts/library.sh @@ -521,6 +521,7 @@ function add_trap { # "master". # Additional dependencies can be included in the upgrade by providing them in a # global env var: FLOATING_DEPS +# --upgrade will set GOPROXY to direct unless it is already set. function go_update_deps() { cd "${REPO_ROOT_DIR}" || return 1 @@ -541,10 +542,20 @@ function go_update_deps() { shift done - if (( UPGRADE )); then + if [[ $UPGRADE == 1 ]]; then echo "--- Upgrading to ${VERSION}" + # From shell parameter expansion: + # ${parameter:+word} + # If parameter is null or unset, nothing is substituted, otherwise the expansion of word is substituted. + # -z is if the length of the string, so skip setting GOPROXY if GOPROXY is already set. + if [[ -z ${GOPROXY:+skip} ]]; then + export GOPROXY=direct + echo "Using 'GOPROXY=direct'." + else + echo "Respecting 'GOPROXY=${GOPROXY}'." + fi FLOATING_DEPS+=( $(run_go_tool knative.dev/test-infra/buoy buoy float ${REPO_ROOT_DIR}/go.mod --release ${VERSION} --domain knative.dev) ) - if (( ${#FLOATING_DEPS[@]} )); then + if [[ ${#FLOATING_DEPS[@]} > 0 ]]; then echo "Floating deps to ${FLOATING_DEPS[@]}" go get -d ${FLOATING_DEPS[@]} else diff --git a/vendor/modules.txt b/vendor/modules.txt index 8cd4310bd..44b019025 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -929,7 +929,7 @@ k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/pointer k8s.io/utils/trace -# knative.dev/test-infra v0.0.0-20201015231956-d236fb0ea9ff +# knative.dev/test-infra v0.0.0-20201020210659-8f5dc4814ac3 ## explicit knative.dev/test-infra/scripts # sigs.k8s.io/boskos v0.0.0-20200729174948-794df80db9c9