From e206e3207dc7e7a5d1c6d82051ad68949e2a1f43 Mon Sep 17 00:00:00 2001 From: Steven Fairchild Date: Mon, 11 Dec 2023 12:42:17 -0500 Subject: [PATCH] Documentation - Update Go dependency management doc Update documentation to remove instructions to run make vendor. This script was previously required when the ARO installer was vendored, as well as other OCP 4.x dependencies. --- docs/updating-dependencies.md | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) 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 @