Skip to content

Commit 21b32f1

Browse files
committed
Rename make tidy to make vendor
And also run the `go work sync` in the end of the main Makefile. Signed-off-by: Jan Kaluza <[email protected]>
1 parent df2bca2 commit 21b32f1

File tree

11 files changed

+44
-46
lines changed

11 files changed

+44
-46
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ storage_linux_testing: &linux_testing
7979
fingerprint_script: cat **/go.sum
8080
folder: $GOPATH/pkg/mod
8181
# Note the cache is populated the first time it is used with the given deps.
82-
# But because each task might not download all he same deps force make tidy
82+
# But because each task might not download all he same deps force make vendor
8383
# which downloads all deps for all modules. This is only run once when the
8484
# cache is created so it should not slow things down much.
85-
populate_script: make tidy
85+
populate_script: make vendor
8686

8787
# Separate scripts for separate outputs, makes debugging easier.
8888
setup_script: '${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'

.github/workflows/validate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
# by default git-validation has some special github action handling but that seems broken.
8888
run: make .install.gitvalidation && git-validation -no-github
8989

90-
go-tidy:
90+
go-vendor:
9191
runs-on: ubuntu-24.04
9292
steps:
9393
- uses: actions/checkout@v5
@@ -96,7 +96,7 @@ jobs:
9696
go-version: 1.25.x
9797
# See comment on lint task
9898
cache-dependency-path: "**/go.sum"
99-
- name: tidy
100-
run: make tidy
99+
- name: vendor
100+
run: make vendor
101101
- name: check if tree is clean
102102
run: hack/tree_status.sh

CONTRIBUTING_GO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ $ make vendor
4848

4949
If you are working in the [container-libs](https://github.com/containers/container-libs) monorepo use:
5050
```
51-
make tidy
51+
make vendor
5252
```
5353
This command syncs the dependency versions across all modules in the repo.
5454

Makefile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ lint: .install.golangci-lint
4949
@$(MAKE) -C image lint
5050
@$(MAKE) -C storage lint
5151

52-
.PHONY: tidy-in-container
53-
tidy-in-container:
54-
podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang make tidy
55-
56-
.PHONY: tidy
57-
tidy:
58-
@$(MAKE) -C common tidy
59-
@$(MAKE) -C image tidy
60-
@$(MAKE) -C storage tidy
52+
.PHONY: vendor-in-container
53+
vendor-in-container:
54+
podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang make vendor
55+
56+
.PHONY: vendor
57+
vendor:
58+
@$(MAKE) -C common vendor
59+
@$(MAKE) -C image vendor
60+
@$(MAKE) -C storage vendor
61+
$(GO) work sync

common/Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,14 @@ lint:
7878
validate: lint
7979
./tools/validate_seccomp.sh ./pkg/seccomp
8080

81-
.PHONY: tidy-in-container
82-
tidy-in-container:
83-
podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang make tidy
81+
.PHONY: vendor-in-container
82+
vendor-in-container:
83+
podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang make vendor
8484

85-
.PHONY: tidy
86-
tidy:
85+
.PHONY: vendor
86+
vendor:
8787
$(GO) mod tidy
88+
$(GO) work vendor
8889
$(GO) mod verify
8990
$(GO) mod edit -toolchain none
9091

common/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ require (
6464
github.com/containerd/errdefs v1.0.0 // indirect
6565
github.com/containerd/errdefs/pkg v0.3.0 // indirect
6666
github.com/containerd/log v0.1.0 // indirect
67-
github.com/containerd/stargz-snapshotter/estargz v0.17.0 // indirect
67+
github.com/containerd/stargz-snapshotter/estargz v0.18.0 // indirect
6868
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect
6969
github.com/cyberphone/json-canonicalization v0.0.0-20241213102144-19d51d7fe467 // indirect
7070
github.com/distribution/reference v0.6.0 // indirect
@@ -85,7 +85,7 @@ require (
8585
github.com/gorilla/mux v1.8.1 // indirect
8686
github.com/hashicorp/errwrap v1.1.0 // indirect
8787
github.com/inconshreveable/mousetrap v1.1.0 // indirect
88-
github.com/klauspost/compress v1.18.0 // indirect
88+
github.com/klauspost/compress v1.18.1 // indirect
8989
github.com/klauspost/pgzip v1.2.6 // indirect
9090
github.com/kr/fs v0.1.0 // indirect
9191
github.com/letsencrypt/boulder v0.0.0-20240620165639-de9c06129bec // indirect
@@ -113,7 +113,7 @@ require (
113113
github.com/tchap/go-patricia/v2 v2.3.3 // indirect
114114
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
115115
github.com/ulikunitz/xz v0.5.15 // indirect
116-
github.com/vbatts/tar-split v0.12.1 // indirect
116+
github.com/vbatts/tar-split v0.12.2 // indirect
117117
github.com/vbauerster/mpb/v8 v8.10.2 // indirect
118118
github.com/vishvananda/netns v0.0.5 // indirect
119119
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect

common/go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
4141
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
4242
github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A=
4343
github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw=
44-
github.com/containerd/stargz-snapshotter/estargz v0.17.0 h1:+TyQIsR/zSFI1Rm31EQBwpAA1ovYgIKHy7kctL3sLcE=
45-
github.com/containerd/stargz-snapshotter/estargz v0.17.0/go.mod h1:s06tWAiJcXQo9/8AReBCIo/QxcXFZ2n4qfsRnpl71SM=
44+
github.com/containerd/stargz-snapshotter/estargz v0.18.0 h1:Ny5yptQgEXSkDFKvlKJGTvf1YJ+4xD8V+hXqoRG0n74=
45+
github.com/containerd/stargz-snapshotter/estargz v0.18.0/go.mod h1:7hfU1BO2KB3axZl0dRQCdnHrIWw7TRDdK6L44Rdeuo0=
4646
github.com/containernetworking/cni v1.3.0 h1:v6EpN8RznAZj9765HhXQrtXgX+ECGebEYEmnuFjskwo=
4747
github.com/containernetworking/cni v1.3.0/go.mod h1:Bs8glZjjFfGPHMw6hQu82RUgEPNGEaBb9KS5KtNMnJ4=
4848
github.com/containernetworking/plugins v1.8.0 h1:WjGbV/0UQyo8A4qBsAh6GaDAtu1hevxVxsEuqtBqUFk=
@@ -139,8 +139,8 @@ github.com/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE
139139
github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung=
140140
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
141141
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
142-
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
143-
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
142+
github.com/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co=
143+
github.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0=
144144
github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
145145
github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
146146
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
@@ -286,8 +286,8 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C
286286
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs=
287287
github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY=
288288
github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
289-
github.com/vbatts/tar-split v0.12.1 h1:CqKoORW7BUWBe7UL/iqTVvkTBOF8UvOMKOIZykxnnbo=
290-
github.com/vbatts/tar-split v0.12.1/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA=
289+
github.com/vbatts/tar-split v0.12.2 h1:w/Y6tjxpeiFMR47yzZPlPj/FcPLpXbTUi/9H7d3CPa4=
290+
github.com/vbatts/tar-split v0.12.2/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA=
291291
github.com/vbauerster/mpb/v8 v8.10.2 h1:2uBykSHAYHekE11YvJhKxYmLATKHAGorZwFlyNw4hHM=
292292
github.com/vbauerster/mpb/v8 v8.10.2/go.mod h1:+Ja4P92E3/CorSZgfDtK46D7AVbDqmBQRTmyTqPElo0=
293293
github.com/vishvananda/netlink v1.3.1 h1:3AEMt62VKqz90r0tmNhog0r/PpWKmrEShJU0wJW6bV0=

hack/tree_status.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
SUGGESTION="${SUGGESTION:-run \"make tidy\" and commit all changes.}"
4+
SUGGESTION="${SUGGESTION:-run \"make vendor\" and commit all changes.}"
55

66
STATUS=$(git status --porcelain)
77
if [[ -z $STATUS ]]

image/Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,13 @@ fmt:
8181
lint:
8282
golangci-lint run --build-tags "$(BUILDTAGS)"
8383

84-
.PHONY: tidy-in-container
85-
tidy-in-container:
86-
podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang make tidy
84+
.PHONY: vendor-in-container
85+
vendor-in-container:
86+
podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang make vendor
8787

88-
.PHONY: tidy
89-
tidy:
88+
.PHONY: vendor
89+
vendor:
9090
go mod tidy
91+
go work vendor
9192
go mod verify
9293
go mod edit -toolchain none

storage/Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,13 @@ lint:
7272
help: ## this help
7373
@awk 'BEGIN {FS = ":.*?## "} /^[a-z A-Z_-]+:.*?## / {gsub(" ",",",$$1);gsub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-21s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
7474

75-
.PHONY: tidy-in-container
76-
tidy-in-container:
77-
podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang make tidy
75+
.PHONY: vendor-in-container
76+
vendor-in-container:
77+
podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang make vendor
7878

79-
.PHONY: tidy
80-
tidy:
79+
.PHONY: vendor
80+
vendor:
8181
$(GO) mod tidy
82+
$(GO) work vendor
8283
$(GO) mod verify
8384
$(GO) mod edit -toolchain none

0 commit comments

Comments
 (0)