Skip to content

Commit

Permalink
Use correct vmware-tanzu/carvel-imgpkg instead of k14s module name
Browse files Browse the repository at this point in the history
- Add documentation for devs switching to new module path

Signed-off-by: John McBride <[email protected]>
  • Loading branch information
jpmcb committed Oct 20, 2021
1 parent b867020 commit 0f17d4c
Show file tree
Hide file tree
Showing 78 changed files with 186 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ builds:

ldflags:
- -buildid=
- -X github.com/k14s/imgpkg/pkg/imgpkg/cmd.Version={{ .Version }}
- -X github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/cmd.Version={{ .Version }}

archives:
- format: binary
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ To keep source code documentation up to date, imgpkg uses [godoc](https://go.dev

To view the docs
1. install godoc: `go get -v golang.org/x/tools/cmd/godoc`
1. Start the server: `godoc -http=:6060` and visit [`http://localhost:6060/pkg/github.com/k14s/imgpkg/`](http://localhost:6060/pkg/github.com/k14s/imgpkg/).
1. Start the server: `godoc -http=:6060` and visit [`http://localhost:6060/pkg/github.com/vmware-tanzu/carvel-imgpkg/`](http://localhost:6060/pkg/github.com/vmware-tanzu/carvel-imgpkg/).
2 changes: 1 addition & 1 deletion cmd/imgpkg/imgpkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

uierrs "github.com/cppforlife/go-cli-ui/errors"
"github.com/cppforlife/go-cli-ui/ui"
"github.com/k14s/imgpkg/pkg/imgpkg/cmd"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/cmd"
)

func main() {
Expand Down
32 changes: 32 additions & 0 deletions docs/dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Development

---

## Build and test

`imgpkg` can be built and tested using the various scripts found in `hack/`:
```
./test-all.sh
...
./build.sh
```

## Using Go Libraries

The `imgpkg` libraries can be used by pulling the dependency into your [Go module.](https://golang.org/ref/mod)

To get the latest version:

```
go get github.com/vmware-tanzu/carvel-imgpkg
```

_Note:_ Older versions of the `imgpkg` declare their module paths as "github.com/k14s/imgpkg".
GitHub re-routes those requests to the correct repository, but all future versions
should pull in the dependency as "github.com/vmware-tanzu/carvel-imgpkg"

```diff
+ require github.com/vmware-tanzu/carvel-imgpkg x.y.z
- require github.com/k14s a.b.c
```

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/k14s/imgpkg
module github.com/vmware-tanzu/carvel-imgpkg

go 1.17

Expand Down
2 changes: 1 addition & 1 deletion hack/build-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ git diff --exit-code || {

# makes builds reproducible
export CGO_ENABLED=0
LDFLAGS="-X github.com/k14s/imgpkg/pkg/imgpkg/cmd.Version=$VERSION -buildid="
LDFLAGS="-X github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/cmd.Version=$VERSION -buildid="


GOOS=darwin GOARCH=amd64 go build -ldflags="$LDFLAGS" -trimpath -o imgpkg-darwin-amd64 ./cmd/imgpkg/...
Expand Down
10 changes: 5 additions & 5 deletions pkg/imgpkg/bundle/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
regname "github.com/google/go-containerregistry/pkg/name"
regv1 "github.com/google/go-containerregistry/pkg/v1"
regremote "github.com/google/go-containerregistry/pkg/v1/remote"
ctlimg "github.com/k14s/imgpkg/pkg/imgpkg/image"
"github.com/k14s/imgpkg/pkg/imgpkg/imageset"
"github.com/k14s/imgpkg/pkg/imgpkg/lockconfig"
plainimg "github.com/k14s/imgpkg/pkg/imgpkg/plainimage"
"github.com/k14s/imgpkg/pkg/imgpkg/util"
ctlimg "github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/image"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imageset"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/lockconfig"
plainimg "github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/plainimage"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/util"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/imgpkg/bundle/bundle_images_lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
regname "github.com/google/go-containerregistry/pkg/name"
regv1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/types"
"github.com/k14s/imgpkg/pkg/imgpkg/lockconfig"
"github.com/k14s/imgpkg/pkg/imgpkg/util"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/lockconfig"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/util"
)

// AllImagesRefs returns a flat list of nested bundles and every image reference for a specific bundle
Expand Down
10 changes: 5 additions & 5 deletions pkg/imgpkg/bundle/bundle_images_lock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (
goui "github.com/cppforlife/go-cli-ui/ui"
regname "github.com/google/go-containerregistry/pkg/name"
regv1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle/bundlefakes"
"github.com/k14s/imgpkg/pkg/imgpkg/lockconfig"
"github.com/k14s/imgpkg/pkg/imgpkg/util"
"github.com/k14s/imgpkg/test/helpers"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle/bundlefakes"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/lockconfig"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/util"
"github.com/vmware-tanzu/carvel-imgpkg/test/helpers"
)

type allImagesLockTests struct {
Expand Down
14 changes: 7 additions & 7 deletions pkg/imgpkg/bundle/bundle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import (
"github.com/cppforlife/go-cli-ui/ui"
goui "github.com/cppforlife/go-cli-ui/ui"
regv1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle/bundlefakes"
"github.com/k14s/imgpkg/pkg/imgpkg/imageset"
"github.com/k14s/imgpkg/pkg/imgpkg/lockconfig"
"github.com/k14s/imgpkg/pkg/imgpkg/plainimage"
"github.com/k14s/imgpkg/pkg/imgpkg/util"
"github.com/k14s/imgpkg/test/helpers"
"github.com/stretchr/testify/assert"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle/bundlefakes"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imageset"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/lockconfig"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/plainimage"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/util"
"github.com/vmware-tanzu/carvel-imgpkg/test/helpers"
)

func TestPullBundleWritingContentsToDisk(t *testing.T) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/imgpkg/bundle/bundlefakes/fake_images_lock_reader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/imgpkg/bundle/contents.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/cppforlife/go-cli-ui/ui"
regname "github.com/google/go-containerregistry/pkg/name"
regv1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/k14s/imgpkg/pkg/imgpkg/plainimage"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/plainimage"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions pkg/imgpkg/bundle/contents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/google/go-containerregistry/pkg/name"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/fake"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle/bundlefakes"
"github.com/k14s/imgpkg/test/helpers"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle/bundlefakes"
"github.com/vmware-tanzu/carvel-imgpkg/test/helpers"
)

func TestNewContentsBundleWithBundles(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/imgpkg/bundle/image_locations_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package bundle_test
import (
"testing"

"github.com/k14s/imgpkg/pkg/imgpkg/bundle"
"github.com/stretchr/testify/require"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle"
)

func TestNewLocationConfigFromBytes(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/imgpkg/bundle/images_refs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1/remote/transport"
"github.com/k14s/imgpkg/pkg/imgpkg/lockconfig"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/lockconfig"
)

//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 github.com/cppforlife/go-cli-ui/ui.UI
Expand Down
8 changes: 4 additions & 4 deletions pkg/imgpkg/bundle/images_refs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (

regv1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/remote/transport"
ctlbundle "github.com/k14s/imgpkg/pkg/imgpkg/bundle"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle/bundlefakes"
"github.com/k14s/imgpkg/pkg/imgpkg/imageset/imagesetfakes"
"github.com/k14s/imgpkg/pkg/imgpkg/lockconfig"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
ctlbundle "github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle/bundlefakes"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imageset/imagesetfakes"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/lockconfig"
)

func TestMain(m *testing.M) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/imgpkg/bundle/locations_configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
regv1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/remote/transport"
"github.com/google/go-containerregistry/pkg/v1/types"
"github.com/k14s/imgpkg/pkg/imgpkg/plainimage"
"github.com/k14s/imgpkg/pkg/imgpkg/util"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/plainimage"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/util"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions pkg/imgpkg/bundle/locations_configs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (

goui "github.com/cppforlife/go-cli-ui/ui"
regname "github.com/google/go-containerregistry/pkg/name"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle"
"github.com/k14s/imgpkg/pkg/imgpkg/util"
"github.com/k14s/imgpkg/test/helpers"
"github.com/stretchr/testify/require"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/util"
"github.com/vmware-tanzu/carvel-imgpkg/test/helpers"
)

func TestLocations(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/imgpkg/bundle/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package bundle

import (
plainimg "github.com/k14s/imgpkg/pkg/imgpkg/plainimage"
plainimg "github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/plainimage"
)

type notABundleError struct {
Expand Down
14 changes: 7 additions & 7 deletions pkg/imgpkg/cmd/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import (
"github.com/cppforlife/go-cli-ui/ui"
regv1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/types"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle"
ctlimgset "github.com/k14s/imgpkg/pkg/imgpkg/imageset"
"github.com/k14s/imgpkg/pkg/imgpkg/lockconfig"
"github.com/k14s/imgpkg/pkg/imgpkg/plainimage"
"github.com/k14s/imgpkg/pkg/imgpkg/registry"
"github.com/k14s/imgpkg/pkg/imgpkg/signature"
"github.com/k14s/imgpkg/pkg/imgpkg/util"
"github.com/spf13/cobra"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle"
ctlimgset "github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imageset"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/lockconfig"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/plainimage"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/registry"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/signature"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/util"
)

const rootBundleLabelKey string = "dev.carvel.imgpkg.copy.root-bundle"
Expand Down
16 changes: 8 additions & 8 deletions pkg/imgpkg/cmd/copy_repo_src.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"fmt"

regname "github.com/google/go-containerregistry/pkg/name"
ctlbundle "github.com/k14s/imgpkg/pkg/imgpkg/bundle"
"github.com/k14s/imgpkg/pkg/imgpkg/imagedesc"
"github.com/k14s/imgpkg/pkg/imgpkg/imageset"
ctlimgset "github.com/k14s/imgpkg/pkg/imgpkg/imageset"
"github.com/k14s/imgpkg/pkg/imgpkg/imagetar"
"github.com/k14s/imgpkg/pkg/imgpkg/lockconfig"
"github.com/k14s/imgpkg/pkg/imgpkg/plainimage"
"github.com/k14s/imgpkg/pkg/imgpkg/util"
ctlbundle "github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imagedesc"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imageset"
ctlimgset "github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imageset"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imagetar"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/lockconfig"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/plainimage"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/util"
)

type SignatureRetriever interface {
Expand Down
18 changes: 9 additions & 9 deletions pkg/imgpkg/cmd/copy_repo_src_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ import (
"github.com/google/go-containerregistry/pkg/name"
regv1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/remote"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle/bundlefakes"
ctlimg "github.com/k14s/imgpkg/pkg/imgpkg/image"
"github.com/k14s/imgpkg/pkg/imgpkg/imagedesc"
"github.com/k14s/imgpkg/pkg/imgpkg/imageset"
"github.com/k14s/imgpkg/pkg/imgpkg/imagetar"
"github.com/k14s/imgpkg/pkg/imgpkg/lockconfig"
"github.com/k14s/imgpkg/pkg/imgpkg/util"
"github.com/k14s/imgpkg/test/helpers"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle/bundlefakes"
ctlimg "github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/image"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imagedesc"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imageset"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/imagetar"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/lockconfig"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/util"
"github.com/vmware-tanzu/carvel-imgpkg/test/helpers"
)

var subject CopyRepoSrc
Expand Down
8 changes: 4 additions & 4 deletions pkg/imgpkg/cmd/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"fmt"

"github.com/cppforlife/go-cli-ui/ui"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle"
"github.com/k14s/imgpkg/pkg/imgpkg/lockconfig"
"github.com/k14s/imgpkg/pkg/imgpkg/plainimage"
"github.com/k14s/imgpkg/pkg/imgpkg/registry"
"github.com/spf13/cobra"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/lockconfig"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/plainimage"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/registry"
)

type PullOptions struct {
Expand Down
8 changes: 4 additions & 4 deletions pkg/imgpkg/cmd/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (

"github.com/cppforlife/go-cli-ui/ui"
regname "github.com/google/go-containerregistry/pkg/name"
"github.com/k14s/imgpkg/pkg/imgpkg/bundle"
"github.com/k14s/imgpkg/pkg/imgpkg/lockconfig"
"github.com/k14s/imgpkg/pkg/imgpkg/plainimage"
"github.com/k14s/imgpkg/pkg/imgpkg/registry"
"github.com/spf13/cobra"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/bundle"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/lockconfig"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/plainimage"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/registry"
)

type PushOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/imgpkg/cmd/registry_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"os"
"time"

"github.com/k14s/imgpkg/pkg/imgpkg/registry"
"github.com/spf13/cobra"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/registry"
)

type RegistryFlags struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/imgpkg/cmd/tag_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/cppforlife/go-cli-ui/ui"
uitable "github.com/cppforlife/go-cli-ui/ui/table"
regname "github.com/google/go-containerregistry/pkg/name"
"github.com/k14s/imgpkg/pkg/imgpkg/registry"
"github.com/spf13/cobra"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/registry"
)

type TagListOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/imgpkg/cmd/tag_resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/cppforlife/go-cli-ui/ui"
regname "github.com/google/go-containerregistry/pkg/name"
"github.com/k14s/imgpkg/pkg/imgpkg/registry"
"github.com/spf13/cobra"
"github.com/vmware-tanzu/carvel-imgpkg/pkg/imgpkg/registry"
)

type TagResolveOptions struct {
Expand Down
Loading

0 comments on commit 0f17d4c

Please sign in to comment.