File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ GOBUILD := CGO_ENABLED=0 GO111MODULE=on go build -v
1515GOINSTALL := CGO_ENABLED=0 GO111MODULE=on go install -v
1616GOMOD := GO111MODULE=on go mod
1717
18+ # GitLab-backed module sources can reject CI runner traffic. Seed GitLab and
19+ # modernc.org modules through the public Go proxy before the direct check.
20+ MOD_CHECK_FILES := go.mod go.sum swapserverrpc/go.mod swapserverrpc/go.sum \
21+ looprpc/go.mod looprpc/go.sum tools/go.mod tools/go.sum
22+ MOD_CHECK_PREFETCH := $(shell awk '($$1 ~ /^(gitlab\.com\/|modernc\.org\/) /) { \
23+ version=$$2; sub("/go.mod$$", "", version); \
24+ if (version ~ /^v/) print $$1 "@" version; \
25+ }' $(MOD_CHECK_FILES ) | sort -u)
26+
1827COMMIT := $(shell git describe --abbrev=40 --dirty --tags)
1928COMMIT_HASH := $(shell git rev-parse HEAD)
2029DIRTY := $(shell git diff-index --quiet HEAD -- || echo dirty)
@@ -156,6 +165,9 @@ mod-tidy:
156165
157166mod-check :
158167 @$(call print, "Checking modules.")
168+ ifneq ($(MOD_CHECK_PREFETCH ) ,)
169+ @GOPROXY=https://proxy.golang.org $(GOMOD) download $(MOD_CHECK_PREFETCH)
170+ endif
159171 GOPROXY=direct $(GOMOD) tidy
160172 cd swapserverrpc/ && GOPROXY=direct $(GOMOD) tidy
161173 cd looprpc/ && GOPROXY=direct $(GOMOD) tidy
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ require (
206206 golang.org/x/tools v0.39.0 // indirect
207207 google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
208208 google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
209- google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
209+ google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217
210210 gopkg.in/errgo.v1 v1.0.1 // indirect
211211 gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
212212 gopkg.in/yaml.v2 v2.4.0 // indirect
You can’t perform that action at this time.
0 commit comments