From c21f11d246f978b46010e99583e3fe580d28226b Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Thu, 12 Oct 2023 16:30:30 -0700 Subject: [PATCH] Describe how to update golang dependencies Signed-off-by: Andrei Vagin --- CONTRIBUTING.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 15681b01a..5fde7203e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -120,6 +120,25 @@ docker run --rm --runtime=my-branch --rm hello-world make refresh ``` +### Update golang dependencies + +First, we need to update dependencies in the go.mod and go.sum files. To do +that, we should checkout the go branch and update dependencies using the go get +tool. + +```bash +git checkout origin/go +go get golang.org/x/net +``` + +Next, we should checkout the master branch and update dependencies in the +WORKSPACE file using the Gazelle tool. + +```bash +git checkout origin/master +bazel run //:gazelle -- update-repos -from_file=go.mod +``` + ### The small print Contributions made by corporations are covered by a different agreement than the