diff --git a/docs/updating-dependencies.md b/docs/updating-dependencies.md index c286459bf77..8392329c370 100644 --- a/docs/updating-dependencies.md +++ b/docs/updating-dependencies.md @@ -1,5 +1,8 @@ # Updating dependencies + - Go Documentation for [Managing dependencies](https://go.dev/doc/modules/managing-dependencies) + - [Go Module Awareness](https://go.dev/blog/go116-module-changes) + To update golang dependencies one has to choose between two options: 1) update the whole dependency tree @@ -9,37 +12,23 @@ To update golang dependencies one has to choose between two options: ## Update the whole dependency tree Done when the need to catch upstream dependencies arises, it can be done by -calling - -```bash -make vendor -``` - -in root folder, which calls `hack/update-go-module-dependencies.sh`. - -The reason for calling script instead of directly calling: +calling: ```bash +# Ensure go module-aware mode is set to auto +export GO111MODULE=auto go get -u ./... go mod tidy -compat=1.18 go mod vendor ``` -is that packages modified in this script do not fully support modules and -semantic versioning via tags. Therefore the proper version is parsed from the version -branch and fixed using replace directive. Otherwise it will upgrade every time -the command is started. - -When upgrading to a newer version of OpenShift, this script have to be updated to -reflect the proper release. - - ## Update only required dependencies When adding new dependencies or updating old ones, based on the requirement of -the PR, one can simply call +the PR, one can simply call: ```bash +export GO111MODULE=auto go get @ OR go get -u @