diff --git a/Sources/XCRemoteCache/Commands/Postbuild/PostbuildContext.swift b/Sources/XCRemoteCache/Commands/Postbuild/PostbuildContext.swift index 3295477..3ec2d77 100644 --- a/Sources/XCRemoteCache/Commands/Postbuild/PostbuildContext.swift +++ b/Sources/XCRemoteCache/Commands/Postbuild/PostbuildContext.swift @@ -29,12 +29,6 @@ enum MachOType: String, Codable { case unknown } -enum PostbuildActionType: String, Codable { - case build - case index = "indexbuild" - case unknown -} - enum PostbuildContextError: Error { /// URL address is not a valid URL case invalidAddress(String) @@ -77,8 +71,6 @@ public struct PostbuildContext { let derivedSourcesDir: URL /// List of all targets to downloaded from the thinning aggregation target var thinnedTargets: [String] - /// Action type: build, indexbuild etc. - var action: PostbuildActionType = .unknown } extension PostbuildContext { @@ -120,10 +112,5 @@ extension PostbuildContext { derivedSourcesDir = try env.readEnv(key: "DERIVED_SOURCES_DIR") let thinFocusedTargetsString: String = env.readEnv(key: "SPT_XCREMOTE_CACHE_THINNED_TARGETS") ?? "" thinnedTargets = thinFocusedTargetsString.split(separator: ",").map(String.init) - if let rawAction = env.readEnv(key: "ACTION") { - action = PostbuildActionType(rawValue: rawAction) ?? .unknown - } else { - action = .unknown - } } } diff --git a/Sources/XCRemoteCache/Commands/Postbuild/XCPostbuild.swift b/Sources/XCRemoteCache/Commands/Postbuild/XCPostbuild.swift index b3905ff..cfd3cd2 100644 --- a/Sources/XCRemoteCache/Commands/Postbuild/XCPostbuild.swift +++ b/Sources/XCRemoteCache/Commands/Postbuild/XCPostbuild.swift @@ -47,11 +47,6 @@ public class XCPostbuild { exit(1, "FATAL: Postbuild initialization failed with error: \(error)") } - guard context.action != .index else { - printToUser("Indexbuild. Skip remote cache") - exit(0) - } - // Postbuild cannot disable marker, so NoopMarkerWriter used instead of a real file writer let modeController = PhaseCacheModeController( tempDir: context.targetTempDir, diff --git a/Sources/XCRemoteCache/Commands/Prebuild/PrebuildContext.swift b/Sources/XCRemoteCache/Commands/Prebuild/PrebuildContext.swift index 044579c..1109a79 100644 --- a/Sources/XCRemoteCache/Commands/Prebuild/PrebuildContext.swift +++ b/Sources/XCRemoteCache/Commands/Prebuild/PrebuildContext.swift @@ -24,12 +24,6 @@ enum PrebuildContextError: Error { case invalidAddress(String) } -enum PrebuildActionType: String, Codable { - case build - case index = "indexbuild" - case unknown -} - public struct PrebuildContext { let targetTempDir: URL let productsDir: URL @@ -49,8 +43,6 @@ public struct PrebuildContext { let targetName: String /// List of all targets to downloaded from the thinning aggregation target var thinnedTargets: [String]? - /// Action type: build, indexbuild etc. - var action: PrebuildActionType = .unknown } extension PrebuildContext { @@ -72,10 +64,5 @@ extension PrebuildContext { self.targetName = targetName let thinFocusedTargetsString: String? = env.readEnv(key: "SPT_XCREMOTE_CACHE_THINNED_TARGETS") thinnedTargets = thinFocusedTargetsString?.split(separator: ",").map(String.init) - if let rawAction = env.readEnv(key: "ACTION") { - action = PrebuildActionType(rawValue: rawAction) ?? .unknown - } else { - action = .unknown - } } } diff --git a/Sources/XCRemoteCache/Commands/Prebuild/XCPrebuild.swift b/Sources/XCRemoteCache/Commands/Prebuild/XCPrebuild.swift index 73884dc..07e1ecd 100644 --- a/Sources/XCRemoteCache/Commands/Prebuild/XCPrebuild.swift +++ b/Sources/XCRemoteCache/Commands/Prebuild/XCPrebuild.swift @@ -36,11 +36,6 @@ public class XCPrebuild { exit(1, "FATAL: Prebuild initialization failed with error: \(error)") } - guard context.action != .index else { - printToUser("Indexbuild. Skip remote cache") - exit(0) - } - // Xcode may call xcprebuild phase even none of compilation files has changed (e.g. when switching between // simulator versions) and modifying 'mdate' of a marker file unnecessary invalidates compilation steps // that have to repeat their "use-from-cache" flow