From 1aa3831d84bd121c9e77ae3337d8794008abd72d Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Wed, 26 May 2021 16:26:23 +0200 Subject: [PATCH] Docs: Better document Go dep upgrading (#34745) Signed-off-by: Arve Knudsen --- UPGRADING_DEPENDENCIES.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/UPGRADING_DEPENDENCIES.md b/UPGRADING_DEPENDENCIES.md index 3f3c87db4bd..914309f287a 100644 --- a/UPGRADING_DEPENDENCIES.md +++ b/UPGRADING_DEPENDENCIES.md @@ -4,14 +4,14 @@ Upgrading Go or Node.js requires making changes in many different files. See bel ## Go -- CircleCi +- Drone - `grafana/build-container` - Appveyor - Dockerfile ## Node.js -- CircleCI +- Drone - `grafana/build-container` - Appveyor - Dockerfile @@ -42,6 +42,10 @@ GO111MODULE=on go mod tidy You have to commit the changes to `go.mod` and `go.sum` before submitting the pull request. +### Upgrading dependencies + +If you need to upgrade a direct or indirect dependency, you can do it like so, $MODULE being the dependency in question: `go get -u $MODULE`. The corresponding entry in go.mod should then have the version you specified; if it's an indirect dependency, the entry should have the `// indirect` comment. Follow this by executing `go mod tidy`, to ensure that go.mod and go.sum are up to date. If the indirect dependency turns out to not be used (transitively) by any of our packages, `go mod tidy` will actually strip it from go.mod. In that case, you can just ignore it since it isn't used in the end. + ## Node.js dependencies Updated using `yarn`. @@ -50,9 +54,9 @@ Updated using `yarn`. ## Where to make changes -### CircleCI +### Drone -Our builds run on CircleCI through our build script. +Our CI builds run on Drone. #### Files @@ -66,7 +70,7 @@ Our builds run on CircleCI through our build script. ### grafana/build-container -The main build step (in CircleCI) is built using a custom build container that comes pre-baked with some of the necessary dependencies. +The main build steps (in Drone) happen using a custom Docker image that comes pre-baked with some of the necessary dependencies. Link: [grafana/build-container](https://github.com/grafana/grafana/tree/main/scripts/build/ci-build)