Skip to content

Commit a1ffced

Browse files
committed
Use API key in notarytool log command
1 parent d039a51 commit a1ffced

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

notarize/log.go

+16-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,22 @@ func log(ctx context.Context, uuid string, opts *Options) (*Log, error) {
6969
"notarytool",
7070
"log",
7171
uuid,
72-
"--apple-id", opts.DeveloperId,
73-
"--password", opts.Password,
74-
"--team-id", opts.Provider,
72+
}
73+
74+
if len(opts.DeveloperId) > 0 {
75+
cmd.Args = append(cmd.Args,
76+
"--apple-id", opts.DeveloperId,
77+
"--password", opts.Password,
78+
"--team-id", opts.Provider,
79+
)
80+
}
81+
82+
if len(opts.APIKey) > 0 {
83+
cmd.Args = append(cmd.Args,
84+
"--key-id", opts.APIKey,
85+
"--key", fmt.Sprintf("~/.appstoreconnect/private_keys/AuthKey_%s.p8", opts.APIKey),
86+
"--issuer", opts.APIIssuer,
87+
)
7588
}
7689

7790
// We store all output in out for logging and in case there is an error

0 commit comments

Comments
 (0)