Skip to content

Commit

Permalink
fix: support custom entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ViRb3 committed Jun 21, 2021
1 parent 798cdf8 commit 393ddd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func mainE() error {
"will be included in each sign job. Should at least contain a signer script 'sign.sh'")
authKey := flag.String("key", "", "Auth key the web service must use to talk to this server")
jobTimeout := flag.Uint64("timeout", 15, "Job timeout in minutes")
entrypoint := flag.String("entrypoint", "sign.sh", "Entrypoint script to run when signing")
flag.Parse()

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

0 comments on commit 393ddd1

Please sign in to comment.