Skip to content

Commit 427a05a

Browse files
authored
Fix profile create (#379)
* Update go-xcode to pull profile create request fix * Update go-xcode * Wire in the new exportOptionsGenerator * Update go-xcode * Code cleanup
1 parent cc31aeb commit 427a05a

File tree

11 files changed

+165
-176
lines changed

11 files changed

+165
-176
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/bitrise-io/go-utils v1.0.14
1010
github.com/bitrise-io/go-utils/v2 v2.0.0-alpha.23
1111
github.com/bitrise-io/go-xcode v1.3.0
12-
github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.56
12+
github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.58
1313
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
1414
github.com/stretchr/testify v1.10.0
1515
gopkg.in/yaml.v3 v3.0.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ github.com/bitrise-io/go-utils/v2 v2.0.0-alpha.23 h1:Dfh4nyZPuEtilBisidejqxBrkx9
1313
github.com/bitrise-io/go-utils/v2 v2.0.0-alpha.23/go.mod h1:3XUplo0dOWc3DqT2XA2SeHToDSg7+j1y1HTHibT2H68=
1414
github.com/bitrise-io/go-xcode v1.3.0 h1:QB8Vyr2oZQro/ocs9DJai80rlYL1hU1kwjHqdGslFLo=
1515
github.com/bitrise-io/go-xcode v1.3.0/go.mod h1:9OwsvrhZ4A2JxHVoEY7CPcABAKA+OE7FQqFfBfvbFuY=
16-
github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.56 h1:JSwOStu6HCkT6b7icTQ3x/0OBNPQ8mD7Q6vQt2hG7fg=
17-
github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.56/go.mod h1:zoLzT5fJE8V2SeYq0D0Z+ZN2FAzERjV3uiqDg5H8Bug=
16+
github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.58 h1:99BVtam/ViO6DrVLwzfPcWuAeWJhOLPF7LMJ9xmBtMw=
17+
github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.58/go.mod h1:zoLzT5fJE8V2SeYq0D0Z+ZN2FAzERjV3uiqDg5H8Bug=
1818
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
1919
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2020
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=

step/step.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77
"strings"
88
"time"
99

10+
"howett.net/plist"
11+
1012
"github.com/bitrise-io/go-steputils/v2/stepconf"
1113
v1command "github.com/bitrise-io/go-utils/command"
1214
v1fileutil "github.com/bitrise-io/go-utils/fileutil"
@@ -36,7 +38,6 @@ import (
3638
"github.com/bitrise-io/go-xcode/xcarchive"
3739
"github.com/bitrise-io/go-xcode/xcodebuild"
3840
"github.com/kballard/go-shellquote"
39-
"howett.net/plist"
4041
)
4142

4243
const (
@@ -446,9 +447,6 @@ func (s XcodebuildArchiver) Run(opts RunOpts) (RunResult, error) {
446447
out.Archive = archiveOut.Archive
447448

448449
IPAExportOpts := xcodeIPAExportOpts{
449-
ProjectPath: opts.ProjectPath,
450-
Scheme: opts.Scheme,
451-
Configuration: opts.Configuration,
452450
XcodeMajorVersion: opts.XcodeMajorVersion,
453451
XcodeAuthOptions: authOptions,
454452

@@ -921,9 +919,6 @@ and use 'Export iOS and tvOS Xcode archive' step to export an App Clip.`, opts.S
921919
}
922920

923921
type xcodeIPAExportOpts struct {
924-
ProjectPath string
925-
Scheme string
926-
Configuration string
927922
XcodeMajorVersion int
928923
XcodeAuthOptions *xcodebuild.AuthenticationParams
929924

@@ -992,24 +987,29 @@ func (s XcodebuildArchiver) xcodeIPAExport(opts xcodeIPAExportOpts) (xcodeIPAExp
992987
return out, err
993988
}
994989

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-
1002990
archiveCodeSignIsXcodeManaged := opts.Archive.IsXcodeManaged()
1003991
signingStyle := exportoptions.SigningStyleManual
1004992
if opts.XcodeAuthOptions != nil {
1005993
signingStyle = exportoptions.SigningStyleAutomatic
1006994
}
1007995

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)
1011997
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)
10131013
}
10141014

10151015
s.logger.Println()

vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/appstoreconnect/profiles.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/bitrise-io/go-xcode/v2/codesign/archive.go

Lines changed: 0 additions & 37 deletions
This file was deleted.

vendor/github.com/bitrise-io/go-xcode/v2/codesign/codesign.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/bitrise-io/go-xcode/v2/exportoptionsgenerator/archive_info_provider.go

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)