Skip to content

Commit 59ee237

Browse files
awlays sign
Signed-off-by: Ramon Petgrave <[email protected]>
1 parent ec5aa6e commit 59ee237

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

internal/builders/generic/attest.go

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package main
1717
import (
1818
"context"
1919
"crypto/sha256"
20-
"encoding/json"
2120
"errors"
2221
"fmt"
2322
"os"
@@ -104,18 +103,25 @@ run in the context of a Github Actions workflow.`,
104103

105104
// Note: the path is validated within CreateNewFileUnderCurrentDirectory().
106105
var attBytes []byte
107-
if utils.IsPresubmitTests() {
108-
attBytes, err = json.Marshal(p)
109-
check(err)
110-
} else {
111-
att, err := signer.Sign(ctx, &intoto.Statement{
112-
StatementHeader: p.StatementHeader,
113-
Predicate: p.Predicate,
114-
})
115-
check(err)
116-
117-
attBytes = att.Bytes()
118-
}
106+
// if utils.IsPresubmitTests() {
107+
// attBytes, err = json.Marshal(p)
108+
// check(err)
109+
// } else {
110+
// att, err := signer.Sign(ctx, &intoto.Statement{
111+
// StatementHeader: p.StatementHeader,
112+
// Predicate: p.Predicate,
113+
// })
114+
// check(err)
115+
116+
// attBytes = att.Bytes()
117+
// }
118+
att, err := signer.Sign(ctx, &intoto.Statement{
119+
StatementHeader: p.StatementHeader,
120+
Predicate: p.Predicate,
121+
})
122+
check(err)
123+
124+
attBytes = att.Bytes()
119125

120126
f, err := utils.CreateNewFileUnderCurrentDirectory(attPath, os.O_WRONLY)
121127
check(err)

0 commit comments

Comments
 (0)