@@ -15,18 +15,14 @@ import (
1515 "github.com/bitrise-io/go-utils/pathutil"
1616 "github.com/bitrise-io/go-utils/sliceutil"
1717 "github.com/bitrise-io/go-utils/stringutil"
18- "github.com/bitrise-io/go-xcode/utility"
1918 "github.com/bitrise-io/go-xcode/xcodebuild"
2019 cache "github.com/bitrise-io/go-xcode/xcodecache"
2120 "github.com/bitrise-io/go-xcode/xcpretty"
2221 "github.com/bitrise-steplib/steps-xcode-archive/utils"
2322 "github.com/kballard/go-shellquote"
2423)
2524
26- const (
27- bitriseXcodeRawResultTextEnvKey = "BITRISE_XCODE_RAW_RESULT_TEXT_PATH"
28- minSupportedXcodeMajorVersion = 6
29- )
25+ const bitriseXcodeRawResultTextEnvKey = "BITRISE_XCODE_RAW_RESULT_TEXT_PATH"
3026
3127// Config ...
3228type Config struct {
@@ -65,18 +61,6 @@ func main() {
6561 fail ("Failed to expand project path (%s), error: %s" , conf .ProjectPath , err )
6662 }
6763
68- // Detect Xcode major version
69- xcodebuildVersion , err := utility .GetXcodeVersion ()
70- if err != nil {
71- fail ("Failed to determine xcode version, error: %s" , err )
72- }
73- log .Printf ("- xcodebuildVersion: %s (%s)" , xcodebuildVersion .Version , xcodebuildVersion .BuildVersion )
74-
75- xcodeMajorVersion := xcodebuildVersion .MajorVersion
76- if xcodeMajorVersion < minSupportedXcodeMajorVersion {
77- fail ("Invalid xcode major version (%d), should not be less then min supported: %d" , xcodeMajorVersion , minSupportedXcodeMajorVersion )
78- }
79-
8064 // Detect xcpretty version
8165 outputTool := conf .OutputTool
8266 if outputTool == "xcpretty" {
@@ -185,12 +169,9 @@ func main() {
185169 analyzeCmd .SetResultBundlePath (xcresultPath )
186170 }
187171
188- var swiftPackagesPath string
189- if xcodeMajorVersion >= 11 {
190- var err error
191- if swiftPackagesPath , err = cache .SwiftPackagesPath (absProjectPath ); err != nil {
192- fail ("Failed to get Swift Packages path, error: %s" , err )
193- }
172+ swiftPackagesPath , err := cache .SwiftPackagesPath (absProjectPath )
173+ if err != nil {
174+ fail ("Failed to get Swift Packages path, error: %s" , err )
194175 }
195176
196177 rawXcodebuildOut , xcErr := runCommandWithRetry (analyzeCmd , outputTool == "xcpretty" , swiftPackagesPath )
@@ -224,7 +205,7 @@ func main() {
224205 }
225206
226207 // Cache swift PM
227- if xcodeMajorVersion >= 11 && conf .CacheLevel == "swift_packages" {
208+ if conf .CacheLevel == "swift_packages" {
228209 if err := cache .CollectSwiftPackages (absProjectPath ); err != nil {
229210 log .Warnf ("Failed to mark swift packages for caching, error: %s" , err )
230211 }
0 commit comments