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

Bump github.com/paketo-buildpacks/libpak from 1.48.0 to 1.49.0 #27

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 go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.15
require (
github.com/buildpacks/libcnb v1.18.0
github.com/onsi/gomega v1.10.3
github.com/paketo-buildpacks/libpak v1.48.0
github.com/paketo-buildpacks/libpak v1.49.0
github.com/sclevine/spec v1.4.0
github.com/stretchr/testify v1.6.1
)
8 changes: 6 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
Expand Down Expand Up @@ -43,8 +45,10 @@ github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs=
github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA=
github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
github.com/paketo-buildpacks/libpak v1.48.0 h1:8p+hyjZbbWExag6WxyCnNJrEOmjvbK6LBzzRxa6HKpA=
github.com/paketo-buildpacks/libpak v1.48.0/go.mod h1:gx1On0u2+Ihyy4sw3nwnawsb+Mkby1FBB/7DQReXdxs=
github.com/paketo-buildpacks/libpak v1.49.0 h1:Yf3wt1RBb5Psjmc1X7joMal/tL15kSl8lz07Rfh48m4=
github.com/paketo-buildpacks/libpak v1.49.0/go.mod h1:8vMe0mZNZj1vqngvtH6KCrs98mL+KW9mTymOb5PE6pw=
github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM=
github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
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 Down
8 changes: 3 additions & 5 deletions helper/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"

"github.com/buildpacks/libcnb"
"github.com/paketo-buildpacks/libpak"
"github.com/paketo-buildpacks/libpak/bard"
"github.com/paketo-buildpacks/libpak/bindings"
)

type Credentials struct {
Expand All @@ -30,9 +30,7 @@ type Credentials struct {
}

func (c Credentials) Execute() (map[string]string, error) {
br := libpak.BindingResolver{Bindings: c.Bindings}

if b, ok, err := br.Resolve("StackdriverDebugger"); err != nil {
if b, ok, err := bindings.ResolveOne(c.Bindings, bindings.OfType("StackdriverDebugger")); err != nil {
return nil, fmt.Errorf("unable to resolve binding StackdriverDebugger\n%w", err)
} else if ok {
if p, ok := b.SecretFilePath("ApplicationCredentials"); ok {
Expand All @@ -41,7 +39,7 @@ func (c Credentials) Execute() (map[string]string, error) {
}
}

if b, ok, err := br.Resolve("StackdriverProfiler"); err != nil {
if b, ok, err := bindings.ResolveOne(c.Bindings, bindings.OfType("StackdriverProfiler")); err != nil {
return nil, fmt.Errorf("unable to resolve binding StackdriverProfiler\n%w", err)
} else if ok {
if p, ok := b.SecretFilePath("ApplicationCredentials"); ok {
Expand Down
8 changes: 3 additions & 5 deletions stackdriver/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@ import (
"fmt"

"github.com/buildpacks/libcnb"
"github.com/paketo-buildpacks/libpak"
"github.com/paketo-buildpacks/libpak/bindings"
)

type Detect struct{}

func (d Detect) Detect(context libcnb.DetectContext) (libcnb.DetectResult, error) {
br := libpak.BindingResolver{Bindings: context.Platform.Bindings}

result := libcnb.DetectResult{Pass: false}

if _, ok, err := br.Resolve("StackdriverDebugger"); err != nil {
if _, ok, err := bindings.ResolveOne(context.Platform.Bindings, bindings.OfType("StackdriverDebugger")); err != nil {
return libcnb.DetectResult{}, fmt.Errorf("unable to resolve binding StackdriverDebugger\n%w", err)
} else if ok {
result.Pass = true
Expand All @@ -56,7 +54,7 @@ func (d Detect) Detect(context libcnb.DetectContext) (libcnb.DetectResult, error
)
}

if _, ok, err := br.Resolve("StackdriverProfiler"); err != nil {
if _, ok, err := bindings.ResolveOne(context.Platform.Bindings, bindings.OfType("StackdriverProfiler")); err != nil {
return libcnb.DetectResult{}, fmt.Errorf("unable to resolve binding StackdriverProfiler\n%w", err)
} else if ok {
result.Pass = true
Expand Down