Skip to content

Commit 5f88697

Browse files
committed
build(release): sign checksum file with Minisign
1 parent 5e5ff94 commit 5f88697

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

script/release.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ func buildAll() error {
103103
}
104104
}
105105

106+
fmt.Println()
107+
if err := signFile(filepath.Join(releaseDir, checksumFilename)); err != nil {
108+
return fmt.Errorf("signing failed: %v\n", err)
109+
}
110+
106111
return nil
107112
}
108113

@@ -238,3 +243,13 @@ func appendChecksum(checksumFilePath, filePath string) error {
238243

239244
return nil
240245
}
246+
247+
func signFile(filePath string) error {
248+
fmt.Printf("Signing %s\n", filePath)
249+
250+
cmd := exec.Command("minisign", "-S", "-m", filePath)
251+
cmd.Stdin = os.Stdin
252+
cmd.Stdout = os.Stdout
253+
cmd.Stderr = os.Stderr
254+
return cmd.Run()
255+
}

0 commit comments

Comments
 (0)