From b4100ec2f08b3f4205bdb5bb81869d443a724ea1 Mon Sep 17 00:00:00 2001 From: Silvin Lubecki Date: Tue, 11 Feb 2020 15:53:42 +0100 Subject: [PATCH] Rename imports to cnabio/cnab-to-oci Update doc.go with canonical import Signed-off-by: Silvin Lubecki --- .circleci/config.yml | 2 +- Dockerfile | 8 ++++---- Makefile | 4 ++-- README.md | 4 ++-- cmd/cnab-to-oci/fixup.go | 2 +- cmd/cnab-to-oci/pull.go | 2 +- cmd/cnab-to-oci/push.go | 2 +- cmd/cnab-to-oci/version.go | 2 +- converter/convert.go | 2 +- converter/convert_test.go | 2 +- converter/doc.go | 2 ++ doc.go | 9 +++++---- relocation/doc.go | 2 ++ remotes/doc.go | 2 ++ remotes/fixup.go | 2 +- remotes/fixup_test.go | 2 +- remotes/fixupoptions.go | 4 ++-- remotes/pull.go | 4 ++-- remotes/pull_test.go | 2 +- remotes/push.go | 6 +++--- remotes/push_test.go | 4 ++-- tests/helpers.go | 2 +- 22 files changed, 39 insertions(+), 32 deletions(-) create mode 100644 converter/doc.go create mode 100644 relocation/doc.go create mode 100644 remotes/doc.go diff --git a/.circleci/config.yml b/.circleci/config.yml index d8b34bb..59e5d77 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,7 @@ jobs: #### expecting it in the form of #### /go/src/github.com/circleci/go-tool #### /go/src/bitbucket.org/circleci/go-tool - working_directory: /go/src/github.com/docker/cnab-to-oci + working_directory: /go/src/github.com/cnabio/cnab-to-oci steps: - checkout - setup_remote_docker: diff --git a/Dockerfile b/Dockerfile index 1e72756..7bf32e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN apk add --no-cache \ # Fetch docker cli to run a registry container for e2e tests RUN curl -Ls https://download.docker.com/linux/static/${DOCKERCLI_CHANNEL}/x86_64/docker-${DOCKERCLI_VERSION}.tgz | tar -xz -WORKDIR /go/src/github.com/docker/cnab-to-oci +WORKDIR /go/src/github.com/cnabio/cnab-to-oci COPY . . RUN make BUILDTIME=$BUILDTIME COMMIT=$COMMIT TAG=$TAG bin/cnab-to-oci &&\ make BUILDTIME=$BUILDTIME COMMIT=$COMMIT TAG=$TAG build-e2e-test @@ -34,9 +34,9 @@ FROM alpine:${ALPINE_VERSION} as e2e # copy all the elements needed for e2e tests from build image COPY --from=build /go/docker/docker /usr/bin/docker -COPY --from=build /go/src/github.com/docker/cnab-to-oci/bin/cnab-to-oci /usr/bin/cnab-to-oci -COPY --from=build /go/src/github.com/docker/cnab-to-oci/e2e /e2e -COPY --from=build /go/src/github.com/docker/cnab-to-oci/e2e.test /e2e/e2e.test +COPY --from=build /go/src/github.com/cnabio/cnab-to-oci/bin/cnab-to-oci /usr/bin/cnab-to-oci +COPY --from=build /go/src/github.com/cnabio/cnab-to-oci/e2e /e2e +COPY --from=build /go/src/github.com/cnabio/cnab-to-oci/e2e.test /e2e/e2e.test # Run end-to-end tests CMD ["e2e/run.sh"] diff --git a/Makefile b/Makefile index 801f31c..a347dda 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .DEFAULT_GOAL := all SHELL:=/bin/bash -PKG_NAME := github.com/docker/cnab-to-oci +PKG_NAME := github.com/cnabio/cnab-to-oci EXEC_EXT := ifeq ($(OS),Windows_NT) @@ -71,7 +71,7 @@ test-e2e: e2e-image docker run --rm --network=host -v /var/run/docker.sock:/var/run/docker.sock cnab-to-oci-e2e build-e2e-test: - $(GO_TEST) -c github.com/docker/cnab-to-oci/e2e + $(GO_TEST) -c github.com/cnabio/cnab-to-oci/e2e e2e-image: docker build $(BUILD_ARGS) . -t cnab-to-oci-e2e diff --git a/README.md b/README.md index 376088f..1fc1b02 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Documentation](https://godoc.org/github.com/docker/cnab-to-oci/remotes?status.svg)](http://godoc.org/github.com/docker/cnab-to-oci/remotes) +[![Documentation](https://godoc.org/github.com/cnabio/cnab-to-oci/remotes?status.svg)](http://godoc.org/github.com/cnabio/cnab-to-oci/remotes) # CNAB to OCI @@ -420,7 +420,7 @@ project. ## Contributors See also the list of -[contributors](https://github.com/docker/cnab-to-oci/graphs/contributors) who +[contributors](https://github.com/cnabio/cnab-to-oci/graphs/contributors) who participated in this project. ## License diff --git a/cmd/cnab-to-oci/fixup.go b/cmd/cnab-to-oci/fixup.go index e02d546..aad84d1 100644 --- a/cmd/cnab-to-oci/fixup.go +++ b/cmd/cnab-to-oci/fixup.go @@ -7,9 +7,9 @@ import ( "os" "github.com/cnabio/cnab-go/bundle" + "github.com/cnabio/cnab-to-oci/remotes" containerdRemotes "github.com/containerd/containerd/remotes" "github.com/docker/cli/cli/config" - "github.com/docker/cnab-to-oci/remotes" "github.com/docker/distribution/reference" "github.com/docker/go/canonical/json" "github.com/spf13/cobra" diff --git a/cmd/cnab-to-oci/pull.go b/cmd/cnab-to-oci/pull.go index a641c39..7b06b1f 100644 --- a/cmd/cnab-to-oci/pull.go +++ b/cmd/cnab-to-oci/pull.go @@ -6,7 +6,7 @@ import ( "io/ioutil" "os" - "github.com/docker/cnab-to-oci/remotes" + "github.com/cnabio/cnab-to-oci/remotes" "github.com/docker/distribution/reference" "github.com/docker/go/canonical/json" "github.com/spf13/cobra" diff --git a/cmd/cnab-to-oci/push.go b/cmd/cnab-to-oci/push.go index 5875914..c34f857 100644 --- a/cmd/cnab-to-oci/push.go +++ b/cmd/cnab-to-oci/push.go @@ -9,7 +9,7 @@ import ( "os" "github.com/cnabio/cnab-go/bundle" - "github.com/docker/cnab-to-oci/remotes" + "github.com/cnabio/cnab-to-oci/remotes" "github.com/docker/distribution/reference" "github.com/docker/docker/client" "github.com/spf13/cobra" diff --git a/cmd/cnab-to-oci/version.go b/cmd/cnab-to-oci/version.go index 251e747..8b7019a 100644 --- a/cmd/cnab-to-oci/version.go +++ b/cmd/cnab-to-oci/version.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/docker/cnab-to-oci/internal" + "github.com/cnabio/cnab-to-oci/internal" "github.com/spf13/cobra" ) diff --git a/converter/convert.go b/converter/convert.go index 928beba..aba61a0 100644 --- a/converter/convert.go +++ b/converter/convert.go @@ -8,8 +8,8 @@ import ( "sort" "github.com/cnabio/cnab-go/bundle" + "github.com/cnabio/cnab-to-oci/relocation" "github.com/containerd/containerd/images" - "github.com/docker/cnab-to-oci/relocation" "github.com/docker/distribution/reference" ocischema "github.com/opencontainers/image-spec/specs-go" ocischemav1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/converter/convert_test.go b/converter/convert_test.go index c781887..5fcd341 100644 --- a/converter/convert_test.go +++ b/converter/convert_test.go @@ -3,7 +3,7 @@ package converter import ( "testing" - "github.com/docker/cnab-to-oci/tests" + "github.com/cnabio/cnab-to-oci/tests" "github.com/docker/distribution/manifest/schema2" "github.com/docker/distribution/reference" ocischemav1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/converter/doc.go b/converter/doc.go new file mode 100644 index 0000000..9e4b172 --- /dev/null +++ b/converter/doc.go @@ -0,0 +1,2 @@ +// Package cnabtooci provides converters to transform CNAB to OCI format and vice versa. +package converter // import "github.com/cnabio/cnab-to-oci/converter" diff --git a/doc.go b/doc.go index b0063f5..eb82c34 100644 --- a/doc.go +++ b/doc.go @@ -1,6 +1,7 @@ -// Package cnabtooci provides converters to transform CNAB to OCI format and vice versa +// Package cnabtooci provides converters to transform CNAB to OCI format and vice versa, +// and high level functions to push and pull bundles to a registry. // In `cmd/cnab-to-oci` you can find the `main` package to create the `cnab-to-oci` binary -// see https://github.com/docker/cnab-to-oci for more information about it. +// see https://github.com/cnabio/cnab-to-oci for more information about it. // -// It can also be used as a library. For more, please refer to http://godoc.org/github.com/docker/cnab-to-oci/remotes -package cnabtooci +// It can also be used as a library. For more, please refer to http://godoc.org/github.com/cnabio/cnab-to-oci/remotes +package cnabtooci // import "github.com/cnabio/cnab-to-oci" diff --git a/relocation/doc.go b/relocation/doc.go new file mode 100644 index 0000000..baf1005 --- /dev/null +++ b/relocation/doc.go @@ -0,0 +1,2 @@ +// Package relocation provides types to handle relocation maps. +package relocation // import "github.com/cnabio/cnab-to-oci/relocation" diff --git a/remotes/doc.go b/remotes/doc.go new file mode 100644 index 0000000..031d4f0 --- /dev/null +++ b/remotes/doc.go @@ -0,0 +1,2 @@ +// Package remotes provides converters to transform CNAB to OCI format and vice versa. +package remotes // import "github.com/cnabio/cnab-to-oci/remotes" diff --git a/remotes/fixup.go b/remotes/fixup.go index 909beaa..edac4be 100644 --- a/remotes/fixup.go +++ b/remotes/fixup.go @@ -7,11 +7,11 @@ import ( "io/ioutil" "github.com/cnabio/cnab-go/bundle" + "github.com/cnabio/cnab-to-oci/relocation" "github.com/containerd/containerd/images" "github.com/containerd/containerd/log" "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/remotes" - "github.com/docker/cnab-to-oci/relocation" "github.com/docker/distribution/reference" ocischemav1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/remotes/fixup_test.go b/remotes/fixup_test.go index 20ccd78..ac39a1a 100644 --- a/remotes/fixup_test.go +++ b/remotes/fixup_test.go @@ -10,9 +10,9 @@ import ( "testing" "github.com/cnabio/cnab-go/bundle" + "github.com/cnabio/cnab-to-oci/relocation" "github.com/containerd/containerd/images" "github.com/containerd/containerd/platforms" - "github.com/docker/cnab-to-oci/relocation" "github.com/docker/distribution/reference" "github.com/opencontainers/go-digest" ocischemav1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/remotes/fixupoptions.go b/remotes/fixupoptions.go index 72f7fa8..701c80c 100644 --- a/remotes/fixupoptions.go +++ b/remotes/fixupoptions.go @@ -6,10 +6,10 @@ import ( "io/ioutil" "github.com/cnabio/cnab-go/bundle" + "github.com/cnabio/cnab-to-oci/internal" + "github.com/cnabio/cnab-to-oci/relocation" "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/remotes" - "github.com/docker/cnab-to-oci/internal" - "github.com/docker/cnab-to-oci/relocation" "github.com/docker/distribution/reference" ocischemav1 "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/remotes/pull.go b/remotes/pull.go index b1b1ac1..02ceef6 100644 --- a/remotes/pull.go +++ b/remotes/pull.go @@ -7,13 +7,13 @@ import ( "io/ioutil" "github.com/cnabio/cnab-go/bundle" + "github.com/cnabio/cnab-to-oci/converter" + "github.com/cnabio/cnab-to-oci/relocation" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/images" "github.com/containerd/containerd/log" "github.com/containerd/containerd/remotes" "github.com/docker/cli/opts" - "github.com/docker/cnab-to-oci/converter" - "github.com/docker/cnab-to-oci/relocation" "github.com/docker/distribution/reference" "github.com/docker/distribution/registry/client/auth" ocischemav1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/remotes/pull_test.go b/remotes/pull_test.go index cbd8283..7650b5e 100644 --- a/remotes/pull_test.go +++ b/remotes/pull_test.go @@ -8,7 +8,7 @@ import ( "os" "testing" - "github.com/docker/cnab-to-oci/tests" + "github.com/cnabio/cnab-to-oci/tests" "github.com/docker/distribution/reference" ocischemav1 "github.com/opencontainers/image-spec/specs-go/v1" "gotest.tools/assert" diff --git a/remotes/push.go b/remotes/push.go index 14f2ca2..77bf330 100644 --- a/remotes/push.go +++ b/remotes/push.go @@ -9,6 +9,9 @@ import ( "os" "github.com/cnabio/cnab-go/bundle" + "github.com/cnabio/cnab-to-oci/converter" + "github.com/cnabio/cnab-to-oci/internal" + "github.com/cnabio/cnab-to-oci/relocation" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/images" "github.com/containerd/containerd/log" @@ -16,9 +19,6 @@ import ( "github.com/docker/cli/cli/config" "github.com/docker/cli/cli/config/credentials" configtypes "github.com/docker/cli/cli/config/types" - "github.com/docker/cnab-to-oci/converter" - "github.com/docker/cnab-to-oci/internal" - "github.com/docker/cnab-to-oci/relocation" "github.com/docker/distribution/reference" "github.com/docker/docker/api/types" registrytypes "github.com/docker/docker/api/types/registry" diff --git a/remotes/push_test.go b/remotes/push_test.go index 7a3da16..db3e927 100644 --- a/remotes/push_test.go +++ b/remotes/push_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/cnabio/cnab-go/bundle" - "github.com/docker/cnab-to-oci/converter" - "github.com/docker/cnab-to-oci/tests" + "github.com/cnabio/cnab-to-oci/converter" + "github.com/cnabio/cnab-to-oci/tests" "github.com/docker/distribution/reference" "github.com/docker/go/canonical/json" ocischemav1 "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/tests/helpers.go b/tests/helpers.go index 9520e86..16d9826 100644 --- a/tests/helpers.go +++ b/tests/helpers.go @@ -3,7 +3,7 @@ package tests import ( "github.com/cnabio/cnab-go/bundle" "github.com/cnabio/cnab-go/bundle/definition" - "github.com/docker/cnab-to-oci/relocation" + "github.com/cnabio/cnab-to-oci/relocation" "github.com/docker/distribution/manifest/schema2" ocischema "github.com/opencontainers/image-spec/specs-go" ocischemav1 "github.com/opencontainers/image-spec/specs-go/v1"