Skip to content

Commit

Permalink
[master] Auto-update dependencies (knative#1174)
Browse files Browse the repository at this point in the history
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
  • Loading branch information
mattmoor authored Mar 25, 2020
1 parent 9f9f7be commit 079ae27
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion vendor/knative.dev/test-infra/scripts/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,19 @@ function run_go_tool() {
if [[ -z "$(which ${tool})" ]]; then
local action=get
[[ $1 =~ ^[\./].* ]] && action=install
go ${action} $1
# Avoid running `go get` from root dir of the repository, as it can change go.sum and go.mod files.
# See discussions in https://github.com/golang/go/issues/27643.
if [[ ${action} == "get" && $(pwd) == "${REPO_ROOT_DIR}" ]]; then
local temp_dir="$(mktemp -d)"
local install_failed=0
# Swallow the output as we are returning the stdout in the end.
pushd "${temp_dir}" > /dev/null 2>&1
go ${action} $1 || install_failed=1
popd > /dev/null 2>&1
(( install_failed )) && return ${install_failed}
else
go ${action} $1
fi
fi
shift 2
${tool} "$@"
Expand Down

0 comments on commit 079ae27

Please sign in to comment.