Skip to content

Commit

Permalink
kv-publish: move audit at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
xtuc committed Jun 9, 2021
1 parent 921ddee commit 60fa4e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions functions/kv-pump/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ func Invoke(ctx context.Context, e gcp.GCSEvent) error {
log.Printf("%s: no files to publish\n", pkgName)
}

if err := audit.WroteKV(ctx, pkgName, version, sris, kvKeys, string(configStr)); err != nil {
log.Printf("failed to audit: %s\n", err)
}

newFiles := cleanNewKVFiles(kvfiles)

pkg := new(packages.Package)
Expand All @@ -133,6 +129,10 @@ func Invoke(ctx context.Context, e gcp.GCSEvent) error {
return fmt.Errorf("failed to update SRIs: %s", err)
}

if err := audit.WroteKV(ctx, pkgName, version, sris, kvKeys, string(configStr)); err != nil {
log.Printf("failed to audit: %s\n", err)
}

return nil
}

Expand Down

0 comments on commit 60fa4e0

Please sign in to comment.