Skip to content

Commit

Permalink
[SWAT-784] Workaround for iTMSTransporter 3.0+fastlane (#126)
Browse files Browse the repository at this point in the history
* Workaround for iTMSTransporter 3.0+fastlane
* Check Xcode version, do not add Transporter params on Xcode 14
  • Loading branch information
lpusok authored Oct 24, 2022
1 parent 2901f98 commit f7a6d87
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 5 deletions.
18 changes: 13 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/bitrise-io/go-utils/retry"
"github.com/bitrise-io/go-xcode/appleauth"
"github.com/bitrise-io/go-xcode/devportalservice"
"github.com/bitrise-io/go-xcode/utility"
"github.com/kballard/go-shellquote"
)

Expand Down Expand Up @@ -385,15 +386,22 @@ alphanumeric characters.`)
options = opts
}

envs := []string{}
if cfg.ITMSParameters != "" {
envs = append(envs, "DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS="+cfg.ITMSParameters)
version, err := utility.GetXcodeVersion()
if err != nil {
fail("Failed to read Xcode version: %w", err)
}

args := []string{
"deliver",
envs := []string{}
// Xcode 14 and above fastlane uses altool to upload
if version.MajorVersion < 14 {
envs = append(envs, "ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD=true")
if cfg.ITMSParameters != "" {
envs = append(envs, "DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS="+cfg.ITMSParameters)
}
}

args := []string{"deliver"}

authParams, err := FastlaneAuthParams(authConfig)
if err != nil {
fail("Failed to set up Fastlane authentication paramteres: %v", err)
Expand Down
8 changes: 8 additions & 0 deletions vendor/github.com/bitrise-io/go-xcode/models/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions vendor/github.com/bitrise-io/go-xcode/utility/path.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions vendor/github.com/bitrise-io/go-xcode/utility/utility.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ github.com/bitrise-io/go-utils/retry
## explicit
github.com/bitrise-io/go-xcode/appleauth
github.com/bitrise-io/go-xcode/devportalservice
github.com/bitrise-io/go-xcode/models
github.com/bitrise-io/go-xcode/utility
# github.com/davecgh/go-spew v1.1.1
github.com/davecgh/go-spew/spew
# github.com/hashicorp/go-cleanhttp v0.5.2
Expand Down

0 comments on commit f7a6d87

Please sign in to comment.