Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Package.resolved

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

8 changes: 4 additions & 4 deletions Sources/XcodeGraph/Models/TargetScript.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ public struct TargetScript: Equatable, Codable, Sendable {
public let inputPaths: [String]

/// List of input filelist paths
public let inputFileListPaths: [AbsolutePath]
public let inputFileListPaths: [String]

/// List of output file paths
public let outputPaths: [String]

/// List of output filelist paths
public let outputFileListPaths: [AbsolutePath]
public let outputFileListPaths: [String]

/// Show environment variables in the logs
public var showEnvVarsInLog: Bool
Expand Down Expand Up @@ -117,9 +117,9 @@ public struct TargetScript: Equatable, Codable, Sendable {
order: Order,
script: Script = .embedded(""),
inputPaths: [String] = [],
inputFileListPaths: [AbsolutePath] = [],
inputFileListPaths: [String] = [],
outputPaths: [String] = [],
outputFileListPaths: [AbsolutePath] = [],
outputFileListPaths: [String] = [],
showEnvVarsInLog: Bool = true,
basedOnDependencyAnalysis: Bool? = nil,
runForInstallBuildsOnly: Bool = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ struct PBXScriptsBuildPhaseMapper: PBXScriptsBuildPhaseMapping {
return nil
}

let inputFileListPaths = try scriptPhase.inputFileListPaths?.compactMap {
try AbsolutePath(validating: $0)
} ?? []

let outputFileListPaths = try scriptPhase.outputFileListPaths?.compactMap {
try AbsolutePath(validating: $0)
} ?? []

let dependencyFile = try scriptPhase.dependencyFile.map {
try AbsolutePath(validating: $0)
}
Expand All @@ -67,9 +59,9 @@ struct PBXScriptsBuildPhaseMapper: PBXScriptsBuildPhaseMapping {
order: determineScriptOrder(buildPhases: buildPhases, scriptPhase: scriptPhase),
script: .embedded(shellScript),
inputPaths: scriptPhase.inputPaths,
inputFileListPaths: inputFileListPaths,
inputFileListPaths: scriptPhase.inputFileListPaths ?? [],
outputPaths: scriptPhase.outputPaths,
outputFileListPaths: outputFileListPaths,
outputFileListPaths: scriptPhase.outputFileListPaths ?? [],
showEnvVarsInLog: scriptPhase.showEnvVarsInLog,
basedOnDependencyAnalysis: scriptPhase.alwaysOutOfDate ? false : nil,
runForInstallBuildsOnly: scriptPhase.runOnlyForDeploymentPostprocessing,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ struct PBXScriptsBuildPhaseMapperTests {
name: "Run Script",
shellScript: "echo Hello",
inputPaths: ["$(SRCROOT)/input.txt"],
outputPaths: ["$(DERIVED_FILE_DIR)/output.txt"]
outputPaths: ["$(DERIVED_FILE_DIR)/output.txt"],
inputFileListPaths: ["${PODS_ROOT}/${CONFIGURATION}/file-list.xcfilelist"]
)
.add(to: pbxProj)

Expand All @@ -39,6 +40,7 @@ struct PBXScriptsBuildPhaseMapperTests {
#expect(script.script == .embedded("echo Hello"))
#expect(script.inputPaths == ["$(SRCROOT)/input.txt"])
#expect(script.outputPaths == ["$(DERIVED_FILE_DIR)/output.txt"])
#expect(script.inputFileListPaths == ["${PODS_ROOT}/${CONFIGURATION}/file-list.xcfilelist"])
}

@Test("Maps raw script build phases not covered by other categories")
Expand Down