Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions codesigndoc/codesigngroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func collectExportCertificate(isMacArchive bool, archiveCertificate certificateu
}
log.Debugf("selected export method: %v", selectedExportMethod)

selectedCertificates, err = filterCertificates(selectedExportMethod, "", selectedCertificates, archiveCertificate, installedCertificates, installedInstallerCertificates)
selectedCertificates, err = filterCertificates(isMacArchive, selectedExportMethod, "", selectedCertificates, archiveCertificate, installedCertificates, installedInstallerCertificates)
if err != nil {
return nil, err
}
Expand All @@ -115,7 +115,7 @@ func collectExportCertificate(isMacArchive bool, archiveCertificate certificateu
return selectedCertificates, nil
}

func filterCertificates(selectedExportMethod, selectedTeam string, selectedCertificates []certificateutil.CertificateInfoModel, archiveCertificate certificateutil.CertificateInfoModel, installedCertificates, installedInstallerCertificates []certificateutil.CertificateInfoModel) ([]certificateutil.CertificateInfoModel, error) {
func filterCertificates(isMacArchive bool, selectedExportMethod, selectedTeam string, selectedCertificates []certificateutil.CertificateInfoModel, archiveCertificate certificateutil.CertificateInfoModel, installedCertificates, installedInstallerCertificates []certificateutil.CertificateInfoModel) ([]certificateutil.CertificateInfoModel, error) {
var certsForSelectedExport []certificateutil.CertificateInfoModel
var err error
log.Debugf("InstalledCerts: %v\n", installedCertificates)
Expand Down Expand Up @@ -236,7 +236,7 @@ Would you like to use this team to export an ipa file?`, archiveCertificate.Team
}

// Collect installer cert for MacOS app-store export.
if selectedExportMethod == "app-store" {
if selectedExportMethod == "app-store" && isMacArchive {
fmt.Println()
question := `Do you want to collect installer certificate for the app-store export? [yes,no]`
collectInstallerCert, err := goinp.AskForBoolWithDefault(question, true)
Expand All @@ -251,7 +251,7 @@ Would you like to use this team to export an ipa file?`, archiveCertificate.Team
}

if collectInstallerCert {
selectedCertificates, err = filterCertificates("installer", selectedTeam, selectedCertificates, archiveCertificate, installedCertificates, installedInstallerCertificates)
selectedCertificates, err = filterCertificates(isMacArchive, "installer", selectedTeam, selectedCertificates, archiveCertificate, installedCertificates, installedInstallerCertificates)
if err != nil {
return nil, err
}
Expand Down