Skip to content

Commit

Permalink
Exclude provenance files for index creation (#86)
Browse files Browse the repository at this point in the history
Signed-off-by: Reinhard Nägele <[email protected]>
  • Loading branch information
unguiculus authored Nov 3, 2020
1 parent 39e47af commit c7da1f3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/releaser/releaser.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"context"
"fmt"
"io"
"io/ioutil"
"math/rand"
"net/http"
"net/url"
Expand Down Expand Up @@ -136,14 +135,16 @@ func (r *Releaser) UpdateIndexFile() (bool, error) {
indexFile = repo.NewIndexFile()
}

chartPackages, err := ioutil.ReadDir(r.config.PackagePath)
// We have to explicitly glob for *.tgz files only. If GPG signing is enabled,
// this would also return *.tgz.prov files otherwise, which we don't want here.
chartPackages, err := filepath.Glob(r.config.PackagePath + "/*.tgz")
if err != nil {
return false, err
}

var update bool
for _, chartPackage := range chartPackages {
ch, err := loader.LoadFile(filepath.Join(r.config.PackagePath, chartPackage.Name()))
ch, err := loader.LoadFile(chartPackage)
if err != nil {
return false, err
}
Expand Down

0 comments on commit c7da1f3

Please sign in to comment.