Skip to content

Commit 393ddd1

Browse files
committed
fix: support custom entrypoint
1 parent 798cdf8 commit 393ddd1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func mainE() error {
4040
"will be included in each sign job. Should at least contain a signer script 'sign.sh'")
4141
authKey := flag.String("key", "", "Auth key the web service must use to talk to this server")
4242
jobTimeout := flag.Uint64("timeout", 15, "Job timeout in minutes")
43+
entrypoint := flag.String("entrypoint", "sign.sh", "Entrypoint script to run when signing")
4344
flag.Parse()
4445

4546
if *signFilesDir == "" || *authKey == "" {
@@ -82,7 +83,7 @@ func mainE() error {
8283
for key, val := range secrets.Load().(map[string]string) {
8384
signEnv = append(signEnv, key+"="+val)
8485
}
85-
cmd := exec.CommandContext(ctx, filepath.Join(workDir, "sign.sh"))
86+
cmd := exec.CommandContext(ctx, filepath.Join(workDir, *entrypoint))
8687
cmd.Dir = workDir
8788
cmd.Env = signEnv
8889
if output, err := cmd.CombinedOutput(); err != nil {

0 commit comments

Comments
 (0)