Skip to content

Commit

Permalink
Merge pull request #985 from sabhiram/gomod/update-gogitignore-signature
Browse files Browse the repository at this point in the history
update go-gitignore's usage to remove impossible error
  • Loading branch information
jromero authored Dec 14, 2020
2 parents 2f93e80 + 40b701a commit 1c83899
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/opencontainers/selinux v1.6.0 // indirect
github.com/pelletier/go-toml v1.8.1
github.com/pkg/errors v0.9.1
github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94
github.com/sabhiram/go-gitignore v0.0.0-20201211074657-223ce5d391b0
github.com/sclevine/spec v1.4.0
github.com/sergi/go-diff v1.1.0 // indirect
github.com/sirupsen/logrus v1.7.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,8 @@ github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvf
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 h1:G04eS0JkAIVZfaJLjla9dNxkJCPiKIGZlw9AfOhzOD0=
github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94/go.mod h1:b18R55ulyQ/h3RaWyloPyER7fWQVZvimKKhnI5OfrJQ=
github.com/sabhiram/go-gitignore v0.0.0-20201211074657-223ce5d391b0 h1:4Q/TASkyjpqyR5DL5+6c2FGSDpHM5bTMSspcXr7J6R8=
github.com/sabhiram/go-gitignore v0.0.0-20201211074657-223ce5d391b0/go.mod h1:b18R55ulyQ/h3RaWyloPyER7fWQVZvimKKhnI5OfrJQ=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
Expand Down
10 changes: 2 additions & 8 deletions internal/commands/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,19 +252,13 @@ func parseProjectToml(appPath, descriptorPath string) (project.Descriptor, strin

func getFileFilter(descriptor project.Descriptor) (func(string) bool, error) {
if len(descriptor.Build.Exclude) > 0 {
excludes, err := ignore.CompileIgnoreLines(descriptor.Build.Exclude...)
if err != nil {
return nil, err
}
excludes := ignore.CompileIgnoreLines(descriptor.Build.Exclude...)
return func(fileName string) bool {
return !excludes.MatchesPath(fileName)
}, nil
}
if len(descriptor.Build.Include) > 0 {
includes, err := ignore.CompileIgnoreLines(descriptor.Build.Include...)
if err != nil {
return nil, err
}
includes := ignore.CompileIgnoreLines(descriptor.Build.Include...)
return includes.MatchesPath, nil
}

Expand Down

0 comments on commit 1c83899

Please sign in to comment.