go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/scripts/bump_go_mod.sh (about) 1 #!/bin/bash 2 # Copyright 2022 The LUCI Authors. 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 16 # This script updates selected dependencies in go.mod to latest versions. 17 # 18 # Dependencies that can be added to this list: 19 # * Base dependencies shared by majority of packages in luci-go. 20 # * Dependencies critical for security. 21 # * Dependencies with a track record of not causing troubles during updates. 22 # 23 # Ideally running this script should always be a stress-free experience. 24 25 set -e 26 27 cd $(dirname "${BASH_SOURCE[0]}") 28 29 deps=( 30 cloud.google.com/go/bigquery@latest 31 cloud.google.com/go/bigtable@latest 32 cloud.google.com/go/cloudtasks@latest 33 cloud.google.com/go/compute@latest 34 cloud.google.com/go/compute/metadata@latest 35 cloud.google.com/go/datastore@latest 36 cloud.google.com/go/errorreporting@latest 37 cloud.google.com/go/iam@latest 38 cloud.google.com/go/kms@latest 39 cloud.google.com/go/logging@latest 40 cloud.google.com/go/profiler@latest 41 cloud.google.com/go/pubsub@latest 42 cloud.google.com/go/secretmanager@latest 43 cloud.google.com/go/spanner@latest 44 cloud.google.com/go/storage@latest 45 github.com/alicebob/miniredis/v2@latest 46 github.com/danjacques/gofslock@latest 47 github.com/dustin/go-humanize@latest 48 github.com/envoyproxy/protoc-gen-validate@latest 49 github.com/golang/protobuf@latest 50 github.com/gomodule/redigo@latest 51 github.com/google/go-cmp@latest 52 github.com/google/tink/go@latest 53 github.com/google/uuid@latest 54 github.com/googleapis/gax-go/v2@latest 55 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace@latest 56 github.com/GoogleCloudPlatform/opentelemetry-operations-go/propagator@latest 57 github.com/gorhill/cronexpr@latest 58 github.com/jordan-wright/email@latest 59 github.com/julienschmidt/httprouter@latest 60 github.com/klauspost/compress@latest 61 github.com/luci/gtreap@latest 62 github.com/maruel/subcommands@latest 63 github.com/mattn/go-tty@latest 64 github.com/mgutz/ansi@latest 65 github.com/Microsoft/go-winio@latest 66 github.com/mitchellh/go-homedir@latest 67 github.com/op/go-logging@latest 68 github.com/pmezard/go-difflib@latest 69 github.com/protocolbuffers/txtpbfmt@latest 70 github.com/russross/blackfriday/v2@latest 71 github.com/sergi/go-diff@latest 72 github.com/smarty/assertions@latest 73 github.com/smartystreets/goconvey@latest 74 github.com/yosuke-furukawa/json5@latest 75 go.opentelemetry.io/contrib/detectors/gcp@latest 76 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@latest 77 go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace@latest 78 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@latest 79 go.opentelemetry.io/otel/sdk@latest 80 go.opentelemetry.io/otel/trace@latest 81 go.opentelemetry.io/otel@latest 82 go.starlark.net@latest 83 golang.org/x/crypto@latest 84 golang.org/x/net@latest 85 golang.org/x/oauth2@latest 86 golang.org/x/sync@latest 87 golang.org/x/sys@latest 88 golang.org/x/term@latest 89 golang.org/x/time@latest 90 golang.org/x/tools@latest 91 google.golang.org/api@latest 92 google.golang.org/appengine@latest 93 google.golang.org/genproto@latest 94 google.golang.org/genproto/googleapis/api@latest 95 google.golang.org/genproto/googleapis/bytestream@latest 96 google.golang.org/genproto/googleapis/rpc@latest 97 google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest 98 google.golang.org/grpc@latest 99 google.golang.org/protobuf@latest 100 gopkg.in/yaml.v2@latest 101 102 # Pinned versions must be updated last, since if something is updated after 103 # them, they can be bumped as dependencies. By updating them last, we'll 104 # downgrade stuff that depend on them instead. 105 ) 106 107 for mod in ${deps[@]}; do 108 echo go get -d ${mod} 109 go get -d ${mod} 110 done 111 112 echo go mod tidy 113 go mod tidy 114 115 echo Updating vendored gensupport code 116 ../common/api/update_gensupport.sh 117 echo Updating vendored googleapis protos 118 ../common/proto/googleapis/import.sh 119 120 echo Checking googleapis modules at the same revision 121 ./check_googleapis_in_sync.py ../