|
7 | 7 | "strings" |
8 | 8 | "time" |
9 | 9 |
|
| 10 | + "howett.net/plist" |
| 11 | + |
10 | 12 | "github.com/bitrise-io/go-steputils/v2/stepconf" |
11 | 13 | v1command "github.com/bitrise-io/go-utils/command" |
12 | 14 | v1fileutil "github.com/bitrise-io/go-utils/fileutil" |
@@ -36,7 +38,6 @@ import ( |
36 | 38 | "github.com/bitrise-io/go-xcode/xcarchive" |
37 | 39 | "github.com/bitrise-io/go-xcode/xcodebuild" |
38 | 40 | "github.com/kballard/go-shellquote" |
39 | | - "howett.net/plist" |
40 | 41 | ) |
41 | 42 |
|
42 | 43 | const ( |
@@ -446,9 +447,6 @@ func (s XcodebuildArchiver) Run(opts RunOpts) (RunResult, error) { |
446 | 447 | out.Archive = archiveOut.Archive |
447 | 448 |
|
448 | 449 | IPAExportOpts := xcodeIPAExportOpts{ |
449 | | - ProjectPath: opts.ProjectPath, |
450 | | - Scheme: opts.Scheme, |
451 | | - Configuration: opts.Configuration, |
452 | 450 | XcodeMajorVersion: opts.XcodeMajorVersion, |
453 | 451 | XcodeAuthOptions: authOptions, |
454 | 452 |
|
@@ -921,9 +919,6 @@ and use 'Export iOS and tvOS Xcode archive' step to export an App Clip.`, opts.S |
921 | 919 | } |
922 | 920 |
|
923 | 921 | type xcodeIPAExportOpts struct { |
924 | | - ProjectPath string |
925 | | - Scheme string |
926 | | - Configuration string |
927 | 922 | XcodeMajorVersion int |
928 | 923 | XcodeAuthOptions *xcodebuild.AuthenticationParams |
929 | 924 |
|
@@ -992,24 +987,29 @@ func (s XcodebuildArchiver) xcodeIPAExport(opts xcodeIPAExportOpts) (xcodeIPAExp |
992 | 987 | return out, err |
993 | 988 | } |
994 | 989 |
|
995 | | - s.logger.TPrintf("Opening Xcode project at path: %s.", opts.ProjectPath) |
996 | | - |
997 | | - xcodeProj, scheme, configuration, err := OpenArchivableProject(opts.ProjectPath, opts.Scheme, opts.Configuration) |
998 | | - if err != nil { |
999 | | - return out, fmt.Errorf("failed to open project: %s: %s", opts.ProjectPath, err) |
1000 | | - } |
1001 | | - |
1002 | 990 | archiveCodeSignIsXcodeManaged := opts.Archive.IsXcodeManaged() |
1003 | 991 | signingStyle := exportoptions.SigningStyleManual |
1004 | 992 | if opts.XcodeAuthOptions != nil { |
1005 | 993 | signingStyle = exportoptions.SigningStyleAutomatic |
1006 | 994 | } |
1007 | 995 |
|
1008 | | - generator := exportoptionsgenerator.New(xcodeProj, scheme, configuration, s.xcodeVersionReader, s.logger) |
1009 | | - exportOptions, err := generator.GenerateApplicationExportOptions(exportMethod, opts.ICloudContainerEnvironment, opts.ExportDevelopmentTeam, |
1010 | | - opts.UploadBitcode, opts.CompileBitcode, archiveCodeSignIsXcodeManaged, signingStyle, opts.TestFlightInternalTestingOnly) |
| 996 | + archiveInfo, err := exportoptionsgenerator.ReadArchiveExportInfo(opts.Archive) |
1011 | 997 | if err != nil { |
1012 | | - return out, err |
| 998 | + return out, fmt.Errorf("failed to read xcarchive: %s", err) |
| 999 | + } |
| 1000 | + |
| 1001 | + generator := exportoptionsgenerator.New(s.xcodeVersionReader, s.logger) |
| 1002 | + exportOptions, err := generator.GenerateApplicationExportOptions(exportoptionsgenerator.ExportProductApp, archiveInfo, exportMethod, signingStyle, exportoptionsgenerator.Opts{ |
| 1003 | + ContainerEnvironment: opts.ICloudContainerEnvironment, |
| 1004 | + TeamID: opts.ExportDevelopmentTeam, |
| 1005 | + UploadBitcode: opts.UploadBitcode, |
| 1006 | + CompileBitcode: opts.CompileBitcode, |
| 1007 | + ArchivedWithXcodeManagedProfiles: archiveCodeSignIsXcodeManaged, |
| 1008 | + TestFlightInternalTestingOnly: opts.TestFlightInternalTestingOnly, |
| 1009 | + ManageVersionAndBuildNumber: false, |
| 1010 | + }) |
| 1011 | + if err != nil { |
| 1012 | + return out, fmt.Errorf("failed to generate xcode export options: %s", err) |
1013 | 1013 | } |
1014 | 1014 |
|
1015 | 1015 | s.logger.Println() |
|
0 commit comments