Skip to content

Commit

Permalink
Uses new run structure in packit
Browse files Browse the repository at this point in the history
  • Loading branch information
ForestEckhardt committed May 18, 2020
1 parent 38a4203 commit 2216570
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 28 deletions.
2 changes: 1 addition & 1 deletion build.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"path/filepath"

"github.com/cloudfoundry/packit"
"github.com/paketo-buildpacks/packit"
)

//go:generate faux --interface EntrypointParser --output fakes/entrypoint_parser.go
Expand Down
2 changes: 1 addition & 1 deletion build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/ForestEckhardt/entrypoint/fakes"
"github.com/cloudfoundry/packit"
"github.com/paketo-buildpacks/packit"
"github.com/sclevine/spec"

main "github.com/ForestEckhardt/entrypoint"
Expand Down
2 changes: 1 addition & 1 deletion detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os"
"path/filepath"

"github.com/cloudfoundry/packit"
"github.com/paketo-buildpacks/packit"
)

func Detect() packit.DetectFunc {
Expand Down
2 changes: 1 addition & 1 deletion detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path/filepath"
"testing"

"github.com/cloudfoundry/packit"
"github.com/paketo-buildpacks/packit"
"github.com/sclevine/spec"

main "github.com/ForestEckhardt/entrypoint"
Expand Down
2 changes: 1 addition & 1 deletion entrypoint_toml_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"

"github.com/BurntSushi/toml"
"github.com/cloudfoundry/packit"
"github.com/paketo-buildpacks/packit"
)

type EntrypointTOMLParser struct{}
Expand Down
2 changes: 1 addition & 1 deletion entrypoint_toml_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path/filepath"
"testing"

"github.com/cloudfoundry/packit"
"github.com/paketo-buildpacks/packit"

main "github.com/ForestEckhardt/entrypoint"

Expand Down
2 changes: 1 addition & 1 deletion fakes/entrypoint_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package fakes
import (
"sync"

"github.com/cloudfoundry/packit"
"github.com/paketo-buildpacks/packit"
)

type EntrypointParser struct {
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ go 1.14
require (
github.com/BurntSushi/toml v0.3.1
github.com/cloudfoundry/dagger v0.0.0-20200507160821-634aab680698
github.com/cloudfoundry/occam v0.0.2
github.com/cloudfoundry/packit v0.0.7
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/golang/protobuf v1.4.0 // indirect
github.com/kr/text v0.2.0 // indirect
Expand All @@ -15,6 +13,7 @@ require (
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.10.0
github.com/paketo-buildpacks/occam v0.0.4
github.com/paketo-buildpacks/packit v0.0.10
github.com/sclevine/spec v1.4.0
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e // indirect
golang.org/x/sys v0.0.0-20200413165638-669c56c373c4 // indirect
Expand Down
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ github.com/cloudfoundry/dagger v0.0.0-20200507160821-634aab680698 h1:4Xx1x1zfYrw
github.com/cloudfoundry/dagger v0.0.0-20200507160821-634aab680698/go.mod h1:imxsOzS3ZCUeBajGhgFPZ6sdzkQJGuvBy85GU49GX60=
github.com/cloudfoundry/libcfbuildpack v1.91.23 h1:RCorc4zL0D4+mG2z/qOueFyYGz1j3rM+e3Vbb37KPLg=
github.com/cloudfoundry/libcfbuildpack v1.91.23/go.mod h1:h95FwHvbelcd0cSOhLC8SGEZXLwCMYh1dZo2kCr7lsA=
github.com/cloudfoundry/occam v0.0.2 h1:YMgij19bFO1zsCz7ttuIMC78J6JRp1hwZs+K2rE8JWM=
github.com/cloudfoundry/occam v0.0.2/go.mod h1:1zcSwIX+VVUMGuKBNL+XASI5G5eqnDa8cTs6M+eonyU=
github.com/cloudfoundry/packit v0.0.3/go.mod h1:9xu1MT6SrenSB4oFOXtruMapQ+vdfGXLzBZDnPjhYrM=
github.com/cloudfoundry/packit v0.0.6 h1:JQojVfWJDcxT2xX2pagWmUf0Jjate8f7HjFGBj2TH10=
github.com/cloudfoundry/packit v0.0.6/go.mod h1:9xu1MT6SrenSB4oFOXtruMapQ+vdfGXLzBZDnPjhYrM=
github.com/cloudfoundry/packit v0.0.7 h1:10j4d31TrJVCahe04A3bQ7QJUO3rpBLvQ+NGFXzg7os=
Expand Down Expand Up @@ -130,6 +127,8 @@ github.com/onsi/gomega v1.10.0 h1:Gwkk+PTu/nfOwNMtUB/mRUv0X7ewW5dO4AERT1ThVKo=
github.com/onsi/gomega v1.10.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
github.com/paketo-buildpacks/occam v0.0.4 h1:NFvufTzuKaPkOhir+Rl2F6OCS5cdSYklwy88To3ZE2o=
github.com/paketo-buildpacks/occam v0.0.4/go.mod h1:GNW2KzdEjWkcAJZj/aI+PSfXxGHkA8XxEkaUaCP5ttY=
github.com/paketo-buildpacks/packit v0.0.10 h1:W29he2huZn6UcSWO6nMgBUQlLBUi4pCrQS+VXcCfYBQ=
github.com/paketo-buildpacks/packit v0.0.10/go.mod h1:S2ud8PcMgCjnOjIYnlituwDFL12uQ9eWy9qjTHlM/IM=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down
2 changes: 1 addition & 1 deletion integration/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"path/filepath"
"testing"

"github.com/cloudfoundry/occam"
"github.com/paketo-buildpacks/occam"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand Down
18 changes: 3 additions & 15 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
package main

import (
"fmt"
"os"
"path/filepath"

"github.com/cloudfoundry/packit"
"github.com/paketo-buildpacks/packit"
)

func main() {
switch filepath.Base(os.Args[0]) {
case "detect":
packit.Detect(Detect())

case "build":
entrypointTOMLParser := NewEntrypointTOMLParser()
entrypointTOMLParser := NewEntrypointTOMLParser()

packit.Build(Build(entrypointTOMLParser))
default:
panic(fmt.Sprintf("unknown command: %s", filepath.Base(os.Args[0])))
}
packit.Run(Detect(), Build(entrypointTOMLParser))
}

0 comments on commit 2216570

Please sign in to comment.