Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change module versions & prep to cut an alpha #251

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Go parameters
GOCMD?=go
GO_VERSION=$(shell go list -m -f "{{.GoVersion}}")
PACKAGE_BASE=github.com/buildpacks/libcnb
PACKAGE_BASE=github.com/buildpacks/libcnb/v2

all: test

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
go get github.com/buildpacks/libcnb
```

or for the v2 alpha

```
go get github.com/buildpacks/[email protected]
```

#### Docs

https://pkg.go.dev/github.com/buildpacks/libcnb?tab=doc
Expand Down
4 changes: 2 additions & 2 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"github.com/BurntSushi/toml"
"github.com/Masterminds/semver"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/v2/internal"
"github.com/buildpacks/libcnb/v2/log"
)

// BuildContext contains the inputs to build.
Expand Down
6 changes: 3 additions & 3 deletions build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2"
"github.com/buildpacks/libcnb/v2/log"
"github.com/buildpacks/libcnb/v2/mocks"
)

func testBuild(t *testing.T, context spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion buildpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/BurntSushi/toml"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"

. "github.com/onsi/gomega"
)
Expand Down
4 changes: 2 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package libcnb
import (
"os"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/v2/internal"
"github.com/buildpacks/libcnb/v2/log"
)

//go:generate mockery --name EnvironmentWriter --case=underscore
Expand Down
4 changes: 2 additions & 2 deletions detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"github.com/BurntSushi/toml"
"github.com/Masterminds/semver"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/v2/internal"
"github.com/buildpacks/libcnb/v2/log"
)

// DetectContext contains the inputs to detection.
Expand Down
6 changes: 3 additions & 3 deletions detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2"
"github.com/buildpacks/libcnb/v2/log"
"github.com/buildpacks/libcnb/v2/mocks"
)

func testDetect(t *testing.T, context spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
)

func testEnvironment(t *testing.T, _ spec.G, it spec.S) {
Expand Down
4 changes: 2 additions & 2 deletions example_build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

cdx "github.com/CycloneDX/cyclonedx-go"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/v2"
"github.com/buildpacks/libcnb/v2/log"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions example_detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"path/filepath"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/v2"
"github.com/buildpacks/libcnb/v2/log"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions example_generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/v2"
"github.com/buildpacks/libcnb/v2/log"
)

type Generator struct {
Expand Down
2 changes: 1 addition & 1 deletion exec_d.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
"path/filepath"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/v2/internal"
)

//go:generate mockery --name ExecD --case=underscore
Expand Down
4 changes: 2 additions & 2 deletions exec_d_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2"
"github.com/buildpacks/libcnb/v2/mocks"
)

func testExecD(t *testing.T, _ spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/BurntSushi/toml"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"

. "github.com/onsi/gomega"
)
Expand Down
4 changes: 2 additions & 2 deletions generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"github.com/BurntSushi/toml"
"github.com/Masterminds/semver"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/v2/internal"
"github.com/buildpacks/libcnb/v2/log"
)

// GenerateContext contains the inputs to generate.
Expand Down
6 changes: 3 additions & 3 deletions generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2"
"github.com/buildpacks/libcnb/v2/log"
"github.com/buildpacks/libcnb/v2/mocks"
)

func testGenerate(t *testing.T, context spec.G, it spec.S) {
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/buildpacks/libcnb
module github.com/buildpacks/libcnb/v2

go 1.20

require (
github.com/BurntSushi/toml v1.3.2
github.com/CycloneDX/cyclonedx-go v0.7.1
github.com/Masterminds/semver v1.5.0
github.com/onsi/gomega v1.27.9
github.com/onsi/gomega v1.27.10
github.com/sclevine/spec v1.4.0
github.com/stretchr/testify v1.8.4
)
Expand All @@ -17,8 +17,8 @@ require (
github.com/kr/text v0.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/text v0.12.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
14 changes: 7 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU=
github.com/onsi/gomega v1.27.9 h1:qIyVWbOsvQEye2QCqLsNSeH/5L1RS9vS382erEWfT3o=
github.com/onsi/gomega v1.27.9/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
Expand All @@ -35,11 +35,11 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50=
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand Down
2 changes: 1 addition & 1 deletion golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ linters:

linters-settings:
goimports:
local-prefixes: github.com/buildpacks/libcnb
local-prefixes: github.com/buildpacks/libcnb/v2
2 changes: 1 addition & 1 deletion internal/config_map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/v2/internal"
)

func testConfigMap(t *testing.T, _ spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion internal/directory_contents.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"os"
"path/filepath"

"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/v2/log"
)

// DirectoryContentsWriter is used write the contents of a directory to the given io.Writer
Expand Down
2 changes: 1 addition & 1 deletion internal/directory_contents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/v2/internal"
)

func testDirectoryContentsWriter(t *testing.T, context spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion internal/environment_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/v2/internal"
)

func testEnvironmentWriter(t *testing.T, _ spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion internal/execd_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/v2/internal"
)

func testExecDWriter(t *testing.T, _ spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion internal/exit_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/v2/internal"
)

func testExitHandler(t *testing.T, _ spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion internal/formatter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/v2/internal"
)

func testFormatters(t *testing.T, context spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion internal/toml_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/v2/internal"
)

func testTOMLWriter(t *testing.T, _ spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
)

func testLayer(t *testing.T, context spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion log/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/v2/log"
)

func testLogger(t *testing.T, context spec.G, it spec.S) {
Expand Down
6 changes: 3 additions & 3 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/log"
"github.com/buildpacks/libcnb/mocks"
"github.com/buildpacks/libcnb/v2"
"github.com/buildpacks/libcnb/v2/log"
"github.com/buildpacks/libcnb/v2/mocks"
)

func testMain(t *testing.T, _ spec.G, it spec.S) {
Expand Down
2 changes: 1 addition & 1 deletion platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"sort"
"strings"

"github.com/buildpacks/libcnb/internal"
"github.com/buildpacks/libcnb/v2/internal"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion platform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
. "github.com/onsi/gomega"
"github.com/sclevine/spec"

"github.com/buildpacks/libcnb"
"github.com/buildpacks/libcnb/v2"
)

func testPlatform(t *testing.T, context spec.G, it spec.S) {
Expand Down
7 changes: 1 addition & 6 deletions tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/buildpacks/libcnb/tools
module github.com/buildpacks/libcnb/tools/v2

go 1.20

Expand Down Expand Up @@ -109,10 +109,7 @@ require (
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/nunnatsa/ginkgolinter v0.11.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polyfloyd/go-errorlint v1.4.0 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
Expand Down Expand Up @@ -148,7 +145,6 @@ require (
github.com/stretchr/objx v0.5.0 // indirect
github.com/stretchr/testify v1.8.2 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/sylvia7788/contextcheck v1.0.9 // indirect
github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect
github.com/tdakkota/asciicheck v0.2.0 // indirect
github.com/tetafro/godot v1.4.11 // indirect
Expand All @@ -171,7 +167,6 @@ require (
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading