Skip to content

Commit 2ac2b9c

Browse files
committed
Make api a Go sub-module
Allow the api to stay at the same v1 go package name and keep using a 1.x version number. This indicates the API is still at 1.x and allows sharing proto types with containerd 1.6 and 1.7 releases. Signed-off-by: Derek McGowan <[email protected]>
1 parent e1b94c0 commit 2ac2b9c

File tree

371 files changed

+42158
-482
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+42158
-482
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ protos: bin/protoc-gen-go-fieldpath
177177
$(eval TMPDIR := $(shell mktemp -d))
178178
@mv ${ROOTDIR}/vendor ${TMPDIR}
179179
@(cd ${ROOTDIR}/api && PATH="${ROOTDIR}/bin:${PATH}" protobuild --quiet ${API_PACKAGES})
180-
find v2 -name '*.pb.go' -exec sh -c 'f={}; mkdir -p $$(dirname "$${f#v2/}"); echo mv $$f $${f#v2/}; mv $$f $${f#v2/}' \;
181180
@mv ${TMPDIR}/vendor ${ROOTDIR}
182181
@rm -rf ${TMPDIR} v2
183182
go-fix-acronym -w -a '^Os' $(shell find api/ -name '*.pb.go')
@@ -472,17 +471,18 @@ vendor: ## ensure all the go.mod/go.sum files are up-to-date including vendor/ d
472471
@$(GO) mod tidy
473472
@$(GO) mod vendor
474473
@$(GO) mod verify
475-
#@(cd ${ROOTDIR}/integration/client && ${GO} mod tidy)
474+
@(cd ${ROOTDIR}/api && ${GO} mod tidy)
476475

477476
verify-vendor: ## verify if all the go.mod/go.sum files are up-to-date
478477
@echo "$(WHALE) $@"
479478
$(eval TMPDIR := $(shell mktemp -d))
480479
@cp -R ${ROOTDIR} ${TMPDIR}
481480
@(cd ${TMPDIR}/containerd && ${GO} mod tidy)
482-
@(cd ${TMPDIR}/containerd/integration/client && ${GO} mod tidy)
481+
@(cd ${TMPDIR}/containerd && ${GO} mod vendor)
482+
@(cd ${TMPDIR}/containerd && ${GO} mod verify)
483+
@(cd ${TMPDIR}/containerd/api && ${GO} mod tidy)
483484
@diff -r -u -q ${ROOTDIR} ${TMPDIR}/containerd
484485
@rm -rf ${TMPDIR}
485-
#@${ROOTDIR}/script/verify-go-modules.sh integration/client
486486

487487

488488
help: ## this help

api/events/container.pb.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/events/container.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ package containerd.events;
2121
import "google/protobuf/any.proto";
2222
import "github.com/containerd/containerd/api/types/fieldpath.proto";
2323

24-
option go_package = "github.com/containerd/containerd/v2/api/events;events";
24+
option go_package = "github.com/containerd/containerd/api/events;events";
2525
option (containerd.types.fieldpath_all) = true;
2626

2727
message ContainerCreate {

api/events/content.pb.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/events/content.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ package containerd.events;
2020

2121
import "github.com/containerd/containerd/api/types/fieldpath.proto";
2222

23-
option go_package = "github.com/containerd/containerd/v2/api/events;events";
23+
option go_package = "github.com/containerd/containerd/api/events;events";
2424
option (containerd.types.fieldpath_all) = true;
2525

2626
message ContentDelete {

api/events/image.pb.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/events/image.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ package containerd.services.images.v1;
2020

2121
import "github.com/containerd/containerd/api/types/fieldpath.proto";
2222

23-
option go_package = "github.com/containerd/containerd/v2/api/events;events";
23+
option go_package = "github.com/containerd/containerd/api/events;events";
2424
option (containerd.types.fieldpath_all) = true;
2525

2626
message ImageCreate {

api/events/namespace.pb.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/events/namespace.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ package containerd.events;
2020

2121
import "github.com/containerd/containerd/api/types/fieldpath.proto";
2222

23-
option go_package = "github.com/containerd/containerd/v2/api/events;events";
23+
option go_package = "github.com/containerd/containerd/api/events;events";
2424
option (containerd.types.fieldpath_all) = true;
2525

2626
message NamespaceCreate {

api/events/sandbox.pb.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)