Skip to content

Commit b7d2b54

Browse files
committed
Fix provenance bundle assembly
1 parent 4762c47 commit b7d2b54

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/leeway/provenance.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const (
3636
// provenanceProcessVersion is the version of the provenance generating process.
3737
// If provenance is enabled in a workspace, this version becomes part of the manifest,
3838
// hence changing it will invalidate previously built packages.
39-
provenanceProcessVersion = 1
39+
provenanceProcessVersion = 2
4040

4141
// ProvenanceBuilderID is the prefix we use as Builder ID when issuing provenance
4242
ProvenanceBuilderID = "github.com/gitpod-io/leeway"
@@ -95,7 +95,7 @@ func writeProvenance(p *Package, buildctx *buildContext, builddir string, subjec
9595
}
9696

9797
func (p *Package) getDependenciesProvenanceBundles(buildctx *buildContext, dst *AttestationBundle) error {
98-
deps := p.GetTransitiveDependencies()
98+
deps := p.GetDependencies()
9999
prevBundleSize := dst.Len()
100100
for _, dep := range deps {
101101
loc, exists := buildctx.LocalCache.Location(dep)
@@ -462,12 +462,12 @@ func (a *AttestationBundle) AddFromBundle(other io.Reader) error {
462462
if err != nil {
463463
return err
464464
}
465+
_, err = a.out.Write([]byte{'\n'})
466+
if err != nil {
467+
return err
468+
}
465469
a.keys[key] = struct{}{}
466470
}
467-
_, err := a.out.Write([]byte{'\n'})
468-
if err != nil {
469-
return err
470-
}
471471

472472
if scan.Err() != nil {
473473
return scan.Err()

0 commit comments

Comments
 (0)