@@ -75,9 +75,6 @@ func printCodesignGroup(group export.CodeSignGroup) {
7575
7676// collectExportCertificate returns the certificate to use for the ipa export
7777func collectExportCertificate (isMacArchive bool , archiveCertificate certificateutil.CertificateInfoModel , installedCertificates []certificateutil.CertificateInfoModel , installedInstallerCertificates []certificateutil.CertificateInfoModel ) ([]certificateutil.CertificateInfoModel , error ) {
78- fmt .Println ()
79- fmt .Println ()
80-
8178 var selectedCertificates []certificateutil.CertificateInfoModel
8279
8380 // Export method
@@ -91,12 +88,12 @@ func collectExportCertificate(isMacArchive bool, archiveCertificate certificateu
9188
9289 // Asking the user over and over until we find a valid certificate for the selected export method.
9390 for searchingValidCertificate := true ; searchingValidCertificate ; {
94-
9591 fmt .Println ()
9692 selectedExportMethod , err := goinp .SelectFromStringsWithDefault ("Select the ipa export method" , 1 , exportMethods )
9793 if err != nil {
9894 return nil , fmt .Errorf ("failed to read input: %s" , err )
9995 }
96+
10097 log .Debugf ("selected export method: %v" , selectedExportMethod )
10198
10299 selectedCertificates , err = filterCertificates (isMacArchive , selectedExportMethod , "" , selectedCertificates , archiveCertificate , installedCertificates , installedInstallerCertificates )
@@ -105,7 +102,7 @@ func collectExportCertificate(isMacArchive bool, archiveCertificate certificateu
105102 }
106103
107104 fmt .Println ()
108- question := `Do you want to collect another certificate? [yes,no] `
105+ question := `Do you want to collect another certificate?`
109106 searchingValidCertificate , err = goinp .AskForBoolWithDefault (question , true )
110107 if err != nil {
111108 return nil , fmt .Errorf ("failed to read input: %s" , err )
@@ -161,6 +158,8 @@ func filterCertificates(isMacArchive bool, selectedExportMethod, selectedTeam st
161158 // Skip it if only 1 team has certificates on the machine. Or the archiving team does'n have the desired certificate type.
162159 // Skip the question + set the useArchiveTeam = false, if multiple team has certificate for the export method but the archiving team is not one of them.
163160 if len (filteredCertificatesByTeam ) > 1 && contains {
161+ fmt .Println ()
162+
164163 question := fmt .Sprintf (`The archive used codesigning files of team: %s - %s
165164Would you like to use this team to export an ipa file?` , archiveCertificate .TeamID , archiveCertificate .TeamName )
166165 useArchiveTeam , err = goinp .AskForBoolWithDefault (question , true )
@@ -280,7 +279,6 @@ func collectExportCodeSignGroups(archive Archive, installedCertificates []certif
280279 }
281280
282281 for true {
283- fmt .Println ()
284282 selectedExportMethod , err := goinp .SelectFromStringsWithDefault ("Select the ipa export method" , 1 , exportMethods )
285283 if err != nil {
286284 return nil , fmt .Errorf ("failed to read input: %s" , err )
@@ -302,7 +300,6 @@ func collectExportCodeSignGroups(archive Archive, installedCertificates []certif
302300 fmt .Println ()
303301 log .Errorf (collectCodesigningFilesInfo )
304302 fmt .Println ()
305- fmt .Println ()
306303 question := "Do you want to collect another ipa export code sign files"
307304 question += "\n (select NO to finish collecting codesign files and continue)"
308305 anotherExport , err := goinp .AskForBoolWithDefault (question , false )
@@ -333,7 +330,6 @@ func collectExportCodeSignGroups(archive Archive, installedCertificates []certif
333330 } else {
334331 sort .Strings (certificateOptions )
335332
336- fmt .Println ()
337333 question := fmt .Sprintf ("Select the Codesign Indentity for %s ipa export" , selectedExportMethod )
338334 selectedCertificateOption , err = goinp .SelectFromStringsWithDefault (question , 1 , certificateOptions )
339335 if err != nil {
@@ -434,15 +430,12 @@ func collectExportCodeSignGroups(archive Archive, installedCertificates []certif
434430 collectedCodeSignGroup = export .NewIOSGroup (* selectedCertificate , selectedBundleIDProfileMap )
435431 }
436432
437- fmt .Println ()
438433 fmt .Println ()
439434 log .Infof ("Codesign settings will be used for %s .ipa/.app export:" , exportMethod (collectedCodeSignGroup ))
440- fmt .Println ()
441435 printCodesignGroup (collectedCodeSignGroup )
442436
443437 collectedCodeSignGroups = append (collectedCodeSignGroups , collectedCodeSignGroup )
444438
445- fmt .Println ()
446439 fmt .Println ()
447440 question := "Do you want to collect another ipa export code sign files"
448441 question += "\n (select NO to finish collecting codesign files and continue)"
@@ -462,10 +455,8 @@ func collectExportCodeSignGroups(archive Archive, installedCertificates []certif
462455func collectExportSelectableCodeSignGroups (archive Archive , installedCertificates []certificateutil.CertificateInfoModel , installedProfiles []profileutil.ProvisioningProfileInfoModel ) []export.SelectableCodeSignGroup {
463456 bundleIDEntitlemenstMap := archive .BundleIDEntitlementsMap ()
464457
465- fmt .Println ()
466458 fmt .Println ()
467459 log .Infof ("Targets to sign:" )
468- fmt .Println ()
469460 for bundleID , entitlements := range bundleIDEntitlemenstMap {
470461 fmt .Printf ("- %s with %d capabilities\n " , bundleID , len (entitlements ))
471462 }
@@ -597,7 +588,6 @@ func getCodeSignGroup(archive Archive, installedCertificates []certificateutil.C
597588
598589 fmt .Println ()
599590 log .Infof ("Codesign settings used for archive:" )
600- fmt .Println ()
601591 printCodesignGroup (archiveCodeSignGroup )
602592
603593 return archiveCodeSignGroup , nil
0 commit comments